About this grade calculator
A small, dependency-free pair of calculators for one job: turning assessment scores and weights into a grade, and turning a target grade into the score you need on a final. No account, no upload, and nothing you type is ever recorded.
Why it exists
"What do I need on the final?" is one of the most common questions a student asks, and the arithmetic behind it is simple algebra — but doing it in your head under exam-week stress is exactly when small mistakes creep in: forgetting to convert a percentage weight to a fraction, or dividing by the wrong total when not every assessment is graded yet. This tool does the arithmetic exactly, shows its work, and flags the two situations that trip people up the most: a target that's already unreachable, and a target that's already guaranteed.
How the calculations are implemented
The weighted average is a straight sum-of-products divided by the total weight actually entered — see the weights-must-sum-to-100 explanation on the main page for why that division matters. The final-grade formula is the same weighted-average relationship solved for one unknown:
required = (desired − current × (1 − w)) / w, where w = finalWeight / 100
Two implementation details worth calling out:
- Rounding is display-only. Every comparison — whether a required score exceeds 100%, whether it's at or below 0%, which letter-grade bracket a percentage falls into — runs against the full-precision number. Only the number shown on screen is rounded, to two decimal places.
- Invalid input never produces a silent wrong answer. A blank or non-numeric field is treated as "not entered yet," not as zero. A row with no weight simply doesn't count toward the average yet, rather than dragging it down as if you'd scored 0% on it.
How it was verified
The pure calculation functions are separated from the page's DOM code specifically so they can run under Node without a browser, and were checked against known-answer cases before this page shipped:
| Case | Expected | Computed | Result |
|---|---|---|---|
| Weighted average, 90%@40 + 80%@60 | 84.00% | 84.00% | match |
| Required final: 88% current, 20% weight, 90% target | 98.00% | 98.00% | match |
| Required final: 95% current, 10% weight, 80% target | −55.00% | −55.00% | match (secured) |
| Required final: 70% current, 10% weight, 90% target | 270.00% | 270.00% | match (not achievable) |
| Letter grade at 84% | B | B | match |
| Letter grade at 92.99% vs 93% | A− / A | A− / A | boundary correct |
| Weights entered sum to 60, not 100 | normalizes over 60 | normalizes over 60 | match |
| Final weight of 0 (invalid) | rejected | rejected | match |
Twelve cases in total were run, covering both the everyday path and the edge cases: no valid rows, an incomplete weight total, a zero-weight final, and both directions of the letter-grade boundary at 90% and 93%. All twelve pass.
How the site is built
- Static HTML, one small stylesheet, one small script. No framework, no build step, no bundler.
- Nothing is fetched from the network. No CDN framework, no web font, no remote image — the favicon is an inline SVG data URI. Once the page has loaded once, it keeps working without a connection.
- System font stack. Your operating system's UI font, so nothing has to download and nothing shifts as the page loads.
- What you type never leaves your device. Both calculators run entirely client-side. Nothing is uploaded, and nothing persists between visits — reload the page and both calculators reset to their example values.
- Dark mode follows your system setting via
prefers-color-scheme.
Scope and honesty about limits
This implements one specific, common grading model: a set of independently weighted assessments, and a final worth a fixed percentage of the whole. It does not model dropped-lowest-score rules, capped extra credit, weights that change mid-term, or any institution-specific rounding or curving policy — those all vary too much between schools to encode as a single formula. The standard letter-grade scale shown is a common US convention, not a universal one; your own syllabus is the actual authority on your grade.
Treat every number here as a planning estimate. It is not your official grade, and this page is not academic advice from your institution.