What Do I Need on My Final? Deriving the Formula Step by Step

It’s the week before finals. Your gradebook says 84%, the syllabus says the final counts for 30%, and you want an 85 in the course. You need a number to aim for, not a vague “do well”. I built the final grade calculator to give that number, and the math behind it fits on one line. The interesting parts are the answers that look wrong: a required score of 170%, or −80%.

The model: a weighted average of two parts

Most syllabuses describe the final as a fixed share of the course grade: “Final exam: 30%”. Everything else (homework, quizzes, the midterm, projects) makes up the other 70%, and your current grade is the average of that part so far.

So the course grade is a weighted average of two numbers: course = current × (1 − w) + final × w.

Here w is the final’s weight as a fraction (30% is 0.3), and every grade is a percentage from 0 to 100. With a current grade of 84 and a final worth 30%, an 80 on the final gives 84 × 0.7 + 80 × 0.3 = 58.8 + 24 = 82.8.

That’s the whole model. It assumes your current grade won’t change before the final, which is why the page’s tips tell you to use the gradebook after all other work is marked.

Solving for the final

The question students ask runs the other way. You know the course grade you want (call it the target) and you need the final score. Start from the same equation, with the target on the left:

  1. target = current × (1 − w) + final × w
  2. target − current × (1 − w) = final × w
  3. final = (target − current × (1 − w)) ÷ w

Step 2 moves the part you’ve already earned to the left. Step 3 divides by the weight. In the code it’s exactly that:

// Course grade = current × (1 − w) + final × w, so final = (target − current × (1 − w)) ÷ w
export function requiredFinal(current: number, weight: number, target: number): GradeResult {
  const error = check(current, weight)
  if (error) return { ok: false, error }
  const w = weight / 100
  return { ok: true, value: clean((target - current * (1 - w)) / w) }
}

For the example: (85 − 84 × 0.7) ÷ 0.3 = (85 − 58.8) ÷ 0.3 = 26.2 ÷ 0.3 = 87.33%. The raw division gives 87.33333…; clean rounds it to 12 significant digits to drop floating-point noise, and the page shows two decimals.

The division by w is also why the weight can’t be 0. A final worth nothing can’t move your grade, and the formula would divide by zero. check refuses a weight of 0 or less, a weight above 100%, and a negative current grade, each with its own message.

A test makes sure the two directions agree: for a current grade of 76.5 and a final worth 35%, it takes the required score for an 82 and feeds it back into the course grade formula. It must come out at exactly 82.

When the answer is above 100% or below 0%

The formula doesn’t know that exam scores stop at 0 and 100. It just solves the equation. So it can return numbers no one can score, and those numbers are the most useful part of the result.

Take a current grade of 70, a final worth 20%, and a goal of 90:

(90 − 70 × 0.8) ÷ 0.2 = (90 − 56) ÷ 0.2 = 170%

No final can give you 170%. The goal is out of reach. Now take a current grade of 95, a final worth 20%, and a goal of 60:

(60 − 95 × 0.8) ÷ 0.2 = (60 − 76) ÷ 0.2 = −80%

You already have 76 points of the course grade from the other 80%, more than the 60 you need. Even a 0 on the final keeps you above the goal.

The code turns the number into one of three states:

export function verdict(required: number, maxScore = 100): Verdict {
  if (required <= 0) return 'secured'
  return required <= maxScore ? 'reachable' : 'out-of-reach'
}
Required score State What the page says
0% or less secured “You’ve already secured 60%: even a 0 on the final keeps you there.” The answer shows 0%, never a negative number.
above 0% up to 100% reachable “Score at least 87.33% on the final to finish with 85%.”
above 100% out of reach “Out of reach without extra credit. With 100% on the final, your course grade would be 76%.”

For the 170% example, that best grade is 70 × 0.8 + 100 × 0.2 = 76%. Telling a student “76 is the most you can get” is more useful than a bare “impossible”, because it gives them a new, real target.

verdict takes a maximum score, 100 by default. The tests check that 104% becomes reachable when the maximum is 110, for an exam with bonus questions. The page itself always uses 100.

One table for every letter grade

A single target isn’t always what you want. Often the real question is “can I still get an A, or should I settle for a B?” So the page runs the same formula once for each cut-off on the common US scale (A from 90, B from 80, C from 70, D from 60) and shows the score you need for each, marked “Already secured” or “out of reach” where that applies.

For a current 84 with a final worth 30%:

Grade Course grade Needed on the final
A 90% or more 104%, out of reach
B 80% or more 70.67%
C 70% or more 37.33%
D 60% or more 4%

Cut-offs differ between schools, which the page says under the table. If yours uses different ones, type your own cut-off as the grade you want.

The reverse: “If I score…”

After the exam, the question changes. You have a rough idea of how it went and you want to know what it does to your course grade. The bottom of the page takes a final score and runs the original equation forward, with courseGrade:

84 × 0.7 + 75 × 0.3 = 58.8 + 22.5 = 81.3%

It’s the same equation as before, solved for the other unknown. Keeping both directions as two small functions on one model, instead of two separate formulas, is what lets the test check one against the other.

What it doesn’t model

  • Grades that aren’t a fixed share. Some courses drop your lowest quiz, replace the midterm with the final if the final is higher, or require a minimum score on the final to pass at all. The formula can’t know these rules.
  • Points instead of percentages. If your gradebook shows 425 of 500 points, turn that into 85% first. The percentage calculator does it.
  • Work that’s still due. If homework or a project is still open, your current grade can move, and so does the score you need.

Try it

The final grade calculator shows the score you need for your goal, the table for each letter grade, and what any final score would do to your course grade. Other calculators for students are in calculators.

Tools in this article

  • Final grade calculator

    Find the score you need on your final exam to get the course grade you want, and what any final score would do to your grade. Free, no sign-up.

More articles