Petersen-Crofts admitted causing the wounds, but argued he was not criminally responsible because he was not of sound mind at the time of the killings.
On Monday, Chief Justice Peter Quinlan handed down his verdict, agreeing Petersen-Crofts should be found not guilty.
Chief Justice Quinlan said Petersen-Crofts was suffering from a mental illness at the time.
"In particular, I find you were suffering from schizophrenia," he said.
"You were deprived of the capacity to know that you ought not do those acts.
"You believed that your actions, as horrifying as they were, were the right thing to do."
Chief Justice Quinlan said "we can and we must" do better at assisting people who suffer from a serious mental illness.
"We, the whole community, have failed you and we failed your mum and your sister and your brother, and we failed your grandmother and the rest of your family whose loss is indescribable," he said.
The court heard Petersen-Crofts' history of mental illness dated back to his mid-teens.
The trial only heard from mental health experts.
Petersen-Crofts sat in the dock with a support worker, while other members of his family sat in the public gallery.
He will be detained in a mental health hospital.
Where to get help:
• 0800 543 354 (0800 LIFELINE) or free text 4357 (HELP) (available 24/7)
• https://www.lifeline.org.nz/services/suicide-crisis-helpline
• YOUTHLINE: 0800 376 633
• NEED TO TALK? Free call or text 1737 (available 24/7)
• KIDSLINE: 0800 543 754 (available 24/7)
• WHATSUP: 0800 942 8787 (1pm to 11pm)
• DEPRESSION HELPLINE: 0800 111 757 or TEXT 4202
• NATIONAL ANXIETY 24 HR HELPLINE: 0800 269 4389
If it is an emergency and you feel like you or someone else is at risk, call 111.