About this GPA calculator

A small, fast, dependency-free tool for one job: turning letter grades and credit hours into a 4.0-scale GPA, with optional weighting and a cumulative mode. No account, no upload, and nothing you type is ever recorded.

Why it exists

GPA arithmetic is simple in principle and easy to get subtly wrong in practice: forgetting to weight by credit hours, silently treating a blank row as a zero, mixing weighted and unweighted numbers in the same average, or fumbling the sign when combining a prior cumulative GPA with a new term. None of it is hard maths, but a spreadsheet built under deadline pressure the night before an application is due is exactly where those mistakes happen.

This tool does the arithmetic the same way every time, refuses to guess at incomplete rows, and explains the method in the open so you can check it against your own numbers by hand.

How the calculation is implemented

Every course contributes quality points — its grade-point value multiplied by its credit hours — and the GPA is the sum of quality points divided by the sum of credit hours:

quality points (one course) = grade points × credit hours GPA = sum(quality points) / sum(credit hours)

Two implementation details that matter more than they sound:

  • Incomplete rows are excluded, never zeroed. A course only counts once it has a recognised letter grade and a credit-hours value greater than zero. A blank grade or a blank credits field does not silently pull the average toward 0.0 — it is simply left out, and the tool tells you how many of your rows were counted.
  • Weighting is additive and uncapped. Honors adds +0.5 and AP/IB adds +1.0 to a grade's base points before averaging. Because the bonus is not capped at 4.0, a weighted GPA can legitimately exceed 4.0 — that is the documented behaviour of weighted scales generally, not an error in this tool.

How it was verified

The GPA and cumulative-GPA functions were run against known test vectors before this page shipped:

Verification test vectors and computed results
CaseExpectedComputedResult
A (3cr) + B (4cr), unweighted24/7 ≈ 3.42863.428571…exact
Same courses, Honors + AP weighted29.5/7 ≈ 4.21434.214285…exact
Prior 3.50 @ 30cr + term 3.4286 @ 7cr129/37 ≈ 3.48653.486486…exact
Row with blank grade or zero creditsexcluded, not zeroedexcludedmatch
All rows blankGPA is null, not NaNnullmatch

Beyond those fixed vectors, the letter-grade lookup was checked to accept lower case and surrounding whitespace, reject anything that is not one of the thirteen recognised grades, and the cumulative function was checked with only a prior GPA, only a term GPA, and neither, to confirm it never divides by zero or returns a number when there is nothing to compute from.

You can verify the pure logic yourself in the browser console on any page of this site: GPA.computeGPA([{grade:'A',credits:3},{grade:'B',credits:4}], false).gpa returns 3.4285714285714284.

How the site is built

  • Static HTML, one small stylesheet, two small scripts. No framework, no build step, no bundler. The maths (gpa.js) is kept separate from the row-building and event wiring (app.js) so the maths alone can be tested under Node.
  • The calculator needs nothing 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 it works offline.
  • System font stack. Your operating system's UI font, so nothing has to download and nothing shifts as it loads.
  • Nothing you type is transmitted. The whole calculation happens in your browser. Course names, grades and credit hours are never uploaded to anything, and nothing is written to storage on this device either — reload the page and the table starts blank again.
  • Dark mode follows your system setting via prefers-color-scheme.

Scope and honesty about limits

This implements the most common US convention for a 4.0 GPA scale: A/A+ capped at 4.0, 0.3-point steps for plus/minus grades, down to F at 0.0, with an optional +0.5 / +1.0 weighting bonus for Honors and AP/IB courses. It is not the only convention in use.

It does not know your specific school's grading policy. Some institutions use an uncapped A+ (4.3 or 4.33), different plus/minus spacing, different weighting bonuses, a 0–100 percentage scale instead of letters, or special rules for repeated courses and transfer credit. None of that can be inferred from a letter grade and a credit count, so this tool cannot get it right for every school — it computes the standard-scale estimate honestly and says so, rather than quietly assuming its convention is universal.

Your institution's registrar and its published grading policy are the authoritative record for your own transcript. Use this tool for planning, sanity-checking and comparing scenarios — not as a substitute for that record.