No deaths were recorded in custody in 1999, 2002, 2006, 2007 and from 2009 to 2014.
All but one of the deaths since 1992 were men.
Further information about the deaths of those in custody was withheld to protect the privacy interests of the deceased person and their family.
Not all the records include a cause of death, but of the records which exist 15 people have died in custody from suicide, while four had existing medical conditions.
The last death in police custody is believed to be 52-year-old William David Bircumshaw, who died in September 2015 in Rotorua.
Where to get help:
• Lifeline: 0800 543 354 (available 24/7)
• Suicide Crisis Helpline: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• Youthline: 0800 376 633
• Kidsline: 0800 543 754 (available 24/7)
• Whatsup: 0800 942 8787 (1pm to 11pm)
• Depression helpline: 0800 111 757 (available 24/7)
If it is an emergency and you feel like you or someone else is at risk, call 111.