Excel guide · 4 min read
How to calculate GPA in Excel
=SUMPRODUCT(B2:B6,D2:D6)/SUM(B2:B6), where B holds credits and D holds grade points. Do not just AVERAGE the points: that ignores credit hours and gives the wrong GPA whenever courses carry different credits.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Course | Credits | Grade | Points | Grade | Points | Prior credits | Prior GPA | ||
| 2 | Calculus I | 4 | B+ | 3.3 | A | 4 | 45 | 3.42 | ||
| 3 | English Composition | 3 | A | 4 | A- | 3.7 | ||||
| 4 | Biology | 4 | A- | 3.7 | B+ | 3.3 | ||||
| 5 | US History | 3 | B | 3 | B | 3 | ||||
| 6 | Studio Art | 1 | A | 4 | B- | 2.7 | ||||
| 7 | C+ | 2.3 | ||||||||
| 8 | C | 2 | ||||||||
| 9 | D | 1 | ||||||||
| 10 | F | 0 |
Step 1: put the grade scale in cells, not in the formula
The sample uses a common 4.0 scale with plus and minus grades in F1:G10 (A = 4.0, A- = 3.7, B+ = 3.3 and so on). Scales differ between schools: some give A+ a 4.3, some have no minus grades, some use a 5.0 scale for honors classes. Copy the scale from your school's catalog or transcript key into these cells and every formula below follows it.
Keeping the scale in a table means you never edit a formula when the scale changes, and anyone checking your sheet can see exactly which points you used.
Step 2: look up the points for each grade
In D2, look up the letter grade in the scale and return its points. FALSE forces an exact match, which matters here: with approximate match, A- and A could be confused because the table is not sorted the way approximate match needs. The dollar signs lock the scale so you can fill the formula down to D6.
VLOOKUP is not case-sensitive, so a grade typed as "b+" still finds B+. A grade that is not in the table (a typo, or a P for pass) returns #N/A, which is useful: it tells you a row needs attention.
Result: 3.3
Calculus I is a B+, which is worth 3.3 points.
Step 3: the weighted GPA
GPA is quality points divided by credits. Quality points for one course are credits times grade points: a 4-credit B+ is 4 x 3.3 = 13.2. SUMPRODUCT multiplies the two columns row by row and adds the results, so the whole calculation fits in one cell.
Here the quality points total 53.0 over 15 credits.
Result: 3.5333333333 shows as 3.53 with Number format
53 quality points over 15 credits: a GPA of about 3.53.
Why AVERAGE gives the wrong answer
AVERAGE treats a 1-credit studio class the same as a 4-credit science course. In this term the A in Studio Art pulls the simple average up, because it counts as a full fifth of the grades even though it is only one fifteenth of the credits.
Use AVERAGE only if every course has the same credits. Otherwise use the SUMPRODUCT version.
Result: 3.6
3.6, which overstates the real 3.53 GPA because credits are ignored.
Cumulative GPA: add this term to your record
To update a cumulative GPA, you need your previous total credits and previous GPA (both on your transcript). Turn the old GPA back into quality points by multiplying by the old credits, add this term's quality points, and divide by all the credits together. Averaging the old GPA and the term GPA would be wrong for the same reason as above: 45 earlier credits outweigh 15 new ones.
Prefer no helper column? In full Excel, =SUMPRODUCT(B2:B6,SUMIF(F2:F10,C2:C6,G2:G10))/SUM(B2:B6) looks up all the grades inside one formula. The helper column is easier to check, so it is the better choice for most people.
Result: 3.4483333333 shows as 3.45 with Number format
(45 x 3.42 + 53) / 60 credits: the cumulative GPA moves from 3.42 to about 3.45.
Round the result the way your school does
Wrap the GPA in ROUND(...,2) to show two decimals, or ROUNDDOWN(...,2) if your school truncates instead of rounding. A truncated 3.4999 is 3.49, a rounded one is 3.50, which can matter for honors cut-offs. If you only need it to look tidy, change the number format and keep the full value underneath.
Result: 3.53
3.53, rounded to two decimals.
Common mistakes
Pass/fail or withdrawn courses counted in the credits
A P or W has no grade points, but if its credits stay in SUM(B2:B6) they drag the GPA down. Leave those rows out of the range, or divide by =SUMPRODUCT(B2:B6*ISNUMBER(D2:D6)) so only graded credits count. Check your school's policy on which courses count.
Approximate match in the VLOOKUP
Leaving off FALSE (or using TRUE) makes VLOOKUP return the wrong points for letter grades. Always end the formula with ,FALSE.
Grades typed with spaces
A grade typed as "B+ " with a trailing space returns #N/A. Clean the column with TRIM, or look up TRIM(C2).
Forgetting the dollar signs on the scale
Without $F$2:$G$10 the scale range slides down as you fill, and lower rows return #N/A or wrong points.
FAQ
What is the formula for GPA in Excel?
Put credits in one column and grade points in another, then use =SUMPRODUCT(credits,points)/SUM(credits). That is total quality points divided by total credits.
How do I convert letter grades to points in Excel?
Make a two-column table of grades and points, then use =VLOOKUP(grade,table,2,FALSE) next to each course. XLOOKUP works too in Excel 365 and 2021 or later.
How do I calculate a weighted GPA for honors or AP classes?
Add the extra points in the scale itself, for example a separate row "A (Honors)" worth 5.0, or add a bonus column and use credits x (points + bonus) in the SUMPRODUCT. Use the weighting your school publishes.
Can Excel calculate GPA on a percentage scale?
Yes. Convert percentages to letters first with a sorted cut-off table and approximate-match VLOOKUP, then look up the points. The letter grade guide shows the cut-off table.
Functions used
VLOOKUPVertical lookupSUMPRODUCTMultiply then addSUMAdds numbersAVERAGEMean of numbersROUNDRounds to digitsROUNDDOWNRounds toward zeroISNUMBERIs it a number?TRIMRemoves extra spaces
Related guides
- Excel formula for letter grades
- Absolute vs relative cell references in Excel
- #N/A error in Excel: causes and fixes
- How to write a nested IF in Excel
- How to make a gradebook in Excel
- Excel formulas cheat sheet: the 25 everyone should know
- How to calculate hours worked (and overtime) in Excel
Updated