He had always been interested in the sciences and liked the mathematics elements to physics, he said.
"I was quite surprised because I got these results a while after I had already checked the results online."
Mr Ransley said he could not have done so well without the help of his teacher, Dr Athol Binns.
"I don't think I would have gotten this with a different teacher taking physics last year."
Mr Ransley said he would be heading to Auckland University this year to study towards a Bachelor of Science.
Read more: Dog owner may have to leave to find suitable rental home
Within his degree he would like to major in either physics or biology or double major in both.
Dr Binns expected Mr Ransley to take out the top place. "I sort of knew from marks in the past. Liam scored 38 out of 40 which is going to be pretty close to the top mark in New Zealand."
With the marks Mr Ransley had received last year he had virtually passed the first and second years of university already, Dr Binns said.
"My guess is they will offer him a scholarship to do research."
Bellvue resident Francis Bridgman said her results were also quite a surprise.
"I didn't even realise, I first thought I just got outstanding scholarship, then I realised the next morning so it was even more exciting.
"My parents are pretty excited and astonished too," she said.
Ms Bridgman said she put in hard work through the whole year to get her top marks.
She was also awarded an outstanding scholarship for biology and one for English.
The 18-year-old said she would be starting a Bachelor of Science in Otago this year and will also be flown to Wellington in May to meet Prime Minister John Key.
Annalise Wynn, also a Bethlehem College student last year, was awarded two outstanding scholarships, one for English and one for economics.
She was the top student in the whole of New Zealand in economics.
She attributed her success to extremely hard work and great teaching and will be going to Victoria to do a double degree in law and psychology.
NZQA Top Subject Scholar Awards winners get:
* $2000 each year for three years as long as students maintain at least a B grade in tertiary studies.