How to Calculate Letter Grades from Numeric Scores in Excel
Three ways to convert percentages to letter grades in Excel: the IF chain, the LOOKUP table, and a free one-click VBA macro with custom thresholds.
2026-04-28
The teacher's grading problem
You have a column of numeric scores: quiz results, exam percentages, project grades. You need a letter grade (A/B/C/D/F) next to each one for the report card or progress sheet.
There are three real ways to do this in Excel. The right one depends on whether you grade on a fixed scale, a custom scale, or a curve.
Approach 1: The IF chain (works for fixed scales)
=IF(A2>=90,"A",IF(A2>=80,"B",IF(A2>=70,"C",IF(A2>=60,"D","F"))))
Drop this in B2 and fill down. It works, but:
- The thresholds are hard-coded. Change to a stricter scale and you have to edit every cell or the whole formula.
- It's one column tied to formulas. If you copy the values somewhere else, the formulas break unless you paste-as-values first.
- It's noisy in the cell. Anyone looking at your sheet sees a 60-character formula instead of a clean letter.
Fine for one assignment. Annoying when you have 12 columns of scores across three classes.
Approach 2: VLOOKUP/XLOOKUP table (more maintainable)
Set up a small reference table on a hidden sheet:
| Min Score | Letter |
|---|---|
| 0 | F |
| 60 | D |
| 70 | C |
| 80 | B |
| 90 | A |
Then:
=VLOOKUP(A2, GradeScale!$A$2:$B$6, 2, TRUE)
(or XLOOKUP with match_mode: -1 for "exact match or next smaller").
This is cleaner. Change the scale by editing the table, and every grade updates. Still leaves you with formulas instead of plain values, though.
Approach 3: A free macro (one-shot, plain values)
If you want plain text letter grades that you can copy, sort, and paste anywhere without breaking, and you'd rather click once than maintain formulas, use a macro.
Download Letter Grade From Numeric Scores. It's a free .xlsm with one macro. No install, no signup.
How it works:
- Select a single column of scores.
- Run the macro from
Alt + F8. - Confirm the cutoffs (default:
90,80,70,60) or enter your own (e.g.93,85,77,70for stricter grading). - Letter grades are written to the column to the right of your selection, as plain values, not formulas.
This is especially nice when:
- You have multiple grading scales for different assignments and don't want to maintain multiple lookup tables.
- You're sharing the gradebook with another teacher who shouldn't have to understand your formulas.
- You want the result to survive copy-paste, CSV export, and other transformations.
Customizing beyond A/B/C/D/F
The default scale has five buckets. If your school uses +/- grading (A+, A, A-, B+, B, B-, C+, C, C-, D, F), the macro doesn't handle that out of the box, but you can edit the .bas source. The logic is one If/ElseIf chain that's straightforward to extend. The source code is plain text alongside the .xlsm file in the repo, so you can audit and modify it freely.
If you grade on a curve (assign letters based on percentile, not absolute score), pre-compute the percentile column first (=RANK.AVG(...)), then run the macro on the percentiles with cutoffs like 90,75,50,25 (top 10% = A, etc.).
When NOT to use a macro
If you need the letter grades to update automatically when scores change (e.g. you're still entering scores), stick with VLOOKUP. Formulas recalculate, macro output doesn't. Run the macro once at the end when scores are final.
Bonus: descriptive statistics for the same data
If you also want mean, median, standard deviation, min, max for the score column (useful for understanding how the class did before assigning grades), run Quick Statistics Summary on the same data. Two clicks: stats first, then letter grades.
FAQ
What scales come built in?
Just one: the default 90,80,70,60. But the input box accepts any four cutoffs you type (must be strictly decreasing).
What about Pass/Fail?
Use cutoffs like 60,40,20,1 and re-label the resulting "A/B/C/D/F" yourself, or edit the macro source.
Can I undo the result?
Yes. Ctrl/Cmd + Z right after running the macro.
Does it round?
No. 89.5 with a 90 cutoff for A becomes a B. Round your scores first if you want 89.5 → 90 → A.
Will it overwrite my data? Yes, the column to the right of your selection. Insert a blank column there first if you have data you don't want overwritten.