# How to convert letter grades to GPA points in Excel

Keep a grade-to-points table and look each grade up with an exact match: `=XLOOKUP(C2,$F$2:$F$11,$G$2:$G$11)`.

**Excel:** `=XLOOKUP(C2,$F$2:$F$11,$G$2:$G$11)` (Excel 2021, 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- |
| Course | Credits | Grade | Points |  | Grade | Points |
| Calculus I | 4 | B+ |  |  | A | 4 |
| English Composition | 3 | A- |  |  | A- | 3.7 |
| Chemistry | 4 | B |  |  | B+ | 3.3 |
| Intro to Psychology | 3 | A |  |  | B | 3 |
| Spanish I | 3 | C+ |  |  | B- | 2.7 |
| Economics | 3 | B- |  |  | C+ | 2.3 |
|  |  |  |  |  | C | 2 |
|  |  |  |  |  | C- | 1.7 |
|  |  |  |  |  | D | 1 |
|  |  |  |  |  | F | 0 |

Formula in D2, filled to D7: `=XLOOKUP(C2,$F$2:$F$11,$G$2:$G$11)`

Result: 3.3; 3.7; 3.0; 4.0; 2.3; 2.7

## How it works

XLOOKUP finds the letter grade in `F2:F11` and returns the points beside it. It is an exact match, so "B+" and "B" are different rows. The `$` keeps the grade table fixed while the formula fills down the courses.

## Other ways

- `=VLOOKUP(C2,$F$2:$G$11,2,FALSE)`: Works in every version. Keep FALSE: an approximate match on letter grades sorts them alphabetically and returns wrong points.

## Common mistakes

- A grade typed with a different dash (A– instead of A-) or a trailing space returns #N/A. Use data validation with the table as the list.
- Pass/fail and withdrawn grades (P, W) aren't in the table. Add them with blank points, or wrap the lookup in IFNA.

## Questions

**How do I calculate the GPA weighted by credits?**

Multiply points by credits and divide by the credits: `=SUMPRODUCT(B2:B7,D2:D7)/SUM(B2:B7)`.

**How do I convert a percentage to a letter grade first?**

Use an approximate match on a table of minimum scores, such as `=XLOOKUP(score,min_scores,letters,,-1)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/letter-grade-to-gpa
