How to assign letter grades with IF or IFS in Excel
Formula (Excel and Google Sheets)
=IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F")Use IFS with the conditions from the highest grade down: =IFS(score>=90,"A",score>=80,"B",score>=70,"C",score>=60,"D",TRUE,"F").
- Result on the example
- one result per row in
C2, filled down toC8 - Works in
- Excel 2019 and later, including Microsoft 365
- Google Sheets
- Same formula
See it work
The formula is already in C2, filled down to C8. Change any input and the result updates, or edit the formula to experiment.
How it works
IFS checks the conditions in order and returns the result for the first one that is TRUE, so the order matters: checking >=60 first would give every passing score a D. The last pair, TRUE,"F", is the catch-all for everything below 60.
=IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F")Result"A"
B293The value in B2.
B2>=90TRUEThe >= operator tests at least.
B2>=80TRUEThe >= operator tests at least.
B2>=70TRUEThe >= operator tests at least.
B2>=60TRUEThe >= operator tests at least.
IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F")"A"IFS: Returns the value for the first true test.- test1
B2>=90TRUE - value1
"A" - test2, value2
B2>=80TRUE - test2
"B" - value2
B2>=70TRUE - test3
"C" - value3
B2>=60TRUE - test4
"D" - value4
TRUE - test5
"F"
- test1
In Google Sheets
The same formula works in Google Sheets: =IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F"). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C",IF(B2>=60,"D","F")))) | A, C, B… | Nested IFs give the same result and work in every version. |
| =XLOOKUP(B2,{0,60,70,80,90},{"F","D","C","B","A"},,-1) | A, C, B… | A lookup on the band starts is easier to change. In a real sheet, keep the bands in cells. |
Common mistakes
- Without the final
TRUE,"F", IFS returns #N/A for scores that match no condition. - 89.5 gets a B here. If grades should round first, use
ROUND(B2,0)in each test.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Assign letter grades with IF or IFS
C2, give the letter grade for the score: A for 90 and above, B for 80, C for 70, D for 60, otherwise F. Fill down to C8.Questions
Is IFS available everywhere?
IFS is in Excel 2019 and later, Microsoft 365 and Google Sheets. Use nested IFs for Excel 2016 and older.
Can I use SWITCH for grades?
SWITCH matches exact values, so it suits categories like "1→Low". For ranges of scores, use IFS or a lookup.
Checked by running on 2026-10-29: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.