Exams aren't a test of you're life but a preparation for you're future exams.
And because you fail a test doesn't mean you will fail the future exams, so don't worry about exams and just have fun learning at school.
Maths is also a very hard subject, so as long as you do you're best you can't do better, no matter what anyone else says!
I hope this helps because i also hate getting bad grades and getting stressed because of it, but that's not how school should be, if you get a bad grade, SO WHAT!
Don't get worried about you're exams, just have fun while you are still a kid, you only have 18 years for that. (But still study a bit, just don't focus too much on you're grade, effort is what counts and it's what will count in the future :D;))