A high school student in Sydney's west has had the razor taken to his exam results over a new haircut.

Dominic Kiehn, 17, has been penalised 20 per cent on his chemistry exam after showing up to All Saints Catholic Senior College in Casula with a haircut that breached the school's uniform policy.

The offending haircut that cost a student on his chemistry exam. Credit:AAP

The Year 11 student was stopped before entering the chemistry exam on Tuesday for sporting stubble and having an undercut hair style.

"I felt like (the teacher) was trying to make an example out of me," he said.