Mr.Brownstone's answer sounds fine, but be aware that for small amounts of data, having a perfectly "normalized" schema may be counterproductive. Let me explain a little.
You'll have three tables, and no data will necessarily be duplicated. The additional table is usually referred to as a "pivot" table, and it might not have any 'real' data in it. Instead, it has metadata. It lists all the ways in which Grade and Subjects are related.
The primary key Mr. Brownstone mentioned, composed of two columns on a pivot table, is called a "composite natural key". You can find lots of web articles saying it is evil. It's not necessarily evil, but it can be a hassle if you aren't careful. If you build a big programming structure on top of it, that abstracts you from the keys, so you can easily change the keys without changing the code much, you'll be fine. But it doesn't sound like you will be doing that. So instead, you'll end up with specialized code that handles multi-part keys. Yuck. When your web app wants to refer to a final grade for a student, it doesn't send/receive (e.g. via URLs) a single integer that represents it, instead it sends pairs of keys that represent Subject/Grade combinations.
And you can extend that thought, because you could have Subject/Grade/Semester/Year composite keys to refer to every class ever taught. Or maybe there are multiple locations or teachers for a class in a year.
So, an alternative to a "composite natural key" is a "surrogate key". Now, your Subject/Grade pairing has a representation of a single number. So you have a table with nothing but three key columns in it. You can see how that might not make your life simpler when you are developing this application. Pivot tables are generally a pain to develop for by-hand.
But, on the other hand, maybe it isn't really "Math" that you are teaching in the 7th and 8th grade. Maybe it's Geometry and Calculus. It is quite acceptable to "denormalize" your data intentionally. Many very popular open-source applications do this, and it makes them MORE powerful, not less. So now, we are back to the starting point, where you might be better off having a table that says:
id grade course_title
0 5 Math
1 6 Math
2 7 Geometry
3 8 Calculus