McKellar grew up in Bedgerabong in NSW, attending Bedgerabong Primary School which was then a one teacher school. His father was the teacher. He then attended Forbes High School before moving to Sydney at 16 to study a Bachelor of Science at the University of Sydney, which he completed with First Class Honours and the University Medal for Physics.