IF Greater Than in Excel (and Greater Than or Equal)
By ExcelReady TeamUpdated 6 min read
The short answer
To test if a value is greater than another in Excel, use > inside IF: =IF(B2>C2,"Above target","Not above"). For greater than or equal to, use >=, which also passes when the two values are the same. You can compare with a number, another cell or a date, and return text, a number or a calculation.
Key takeaways
means greater than; >= means greater than or equal to. Never write =>.
- Use >= when hitting the limit exactly should count as a pass.
- Compare with another cell, B2>C2, or a fixed cell locked with $, B2>$F$1.
- For dates, compare with DATE(2026,6,30), not with a date typed as text.
- Text is always 'greater than' any number in Excel, so numbers stored as text give wrong results.
On this page+
An IF greater than formula in Excel checks whether one value is bigger than another and returns a result for each case: =IF(B2>C2,"Above target","Not above"). Use > for strictly greater than and >= when an equal value should also pass. This guide shows both on a sales table, then covers comparing with a fixed cell, dates and calculations, plus the text-versus-number trap that silently breaks these formulas.
Greater than vs greater than or equal to#
> passes only when the left value is bigger. >= also passes when the two values are the same. The difference only matters at the exact limit, but that's where mistakes get noticed.
| Operator | Meaning | Sales 15,500, target 15,000 | Sales 15,000, target 15,000 | Sales 14,500, target 15,000 |
|---|---|---|---|---|
> | greater than | TRUE | FALSE | FALSE |
>= | greater than or equal to | TRUE | TRUE | FALSE |
Always type the > first: >=. Excel rejects => as an invalid formula. The lesson on TRUE, FALSE and comparisons practises all six comparison operators.
How to write an IF greater than formula#
The examples use this sales table in A1:C6:
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Sales | Target |
| 2 | Jo | 12,500 | 12,000 |
| 3 | Kai | 9,800 | 10,000 |
| 4 | Lin | 15,000 | 15,000 |
| 5 | Mo | 7,200 | 8,000 |
| 6 | Nora | 11,300 | 9,500 |
In D2, compare sales with the target and fill down (Windows: Ctrl+D; Mac: ⌘D):
=IF(B2>C2,"Above target","Not above")Jo and Nora show Above target. Kai and Mo show Not above. So does Lin, because 15,000 is not greater than 15,000.
If hitting the target exactly should count, switch to >=:
=IF(B2>=C2,"Hit","Missed")Now Jo, Lin and Nora show Hit. Read the rule you've been given carefully: "more than" means >, while "at least" or "or more" means >=. For the IF basics, see the IF function explained simply or the one-page IF function guide.
How to compare with a fixed number or cell#
To compare with a fixed number, type it straight into the test: =IF(B2>10000,"Big month",""). Numbers don't need quotes.
A better habit is to put the limit in its own cell, say F1, and lock it with dollar signs:
=IF(B2>$F$1,"Big month","")The $ signs keep F1 fixed as you fill down, while B2 moves to B3, B4 and so on. When the limit changes, you edit one cell instead of every formula. Press F4 on Windows (⌘T on Mac) to add the dollar signs.
Three results instead of two#
Sometimes you need to separate "above", "exactly on" and "below". Nest a second IF so each case gets its own label:
=IF(B2>C2,"Above",IF(B2=C2,"On target","Below"))Jo and Nora show Above, Lin shows On target, and Kai and Mo show Below. Excel checks the first test, and only if it's FALSE moves on to the second. In Excel 2019 and later you can write the same rule with IFS: =IFS(B2>C2,"Above",B2=C2,"On target",TRUE,"Below").
How to return a number or calculation#
The true and false results can be numbers or formulas. Leave the quotes off.
=IF(B2>C2,(B2-C2)*10%,0)This pays 10% commission on sales above target. Jo earns (12,500 - 12,000) × 10% = 50. Nora earns (11,300 - 9,500) × 10% = 180. Everyone else gets 0.
A classic version is overtime: if hours in B2 are greater than 40, pay the extra hours at time and a half.
=IF(B2>40,(B2-40)*1.5,0)For 46 hours, the result is 9 overtime hours. For 38 hours, it's 0. If you prefer a Yes or No flag instead of a number, see IF with Yes or No.
How to use IF greater than with dates#
Excel stores dates as numbers, so > means "later than". Compare with a real date built by DATE, not with a date typed in quotes:
=IF(B2>DATE(2026,6,30),"Second half","First half")A date of 15 August 2026 returns Second half. If you write B2>"30/06/2026" instead, Excel compares a number with text, and the result is always FALSE, because text counts as greater than any number. For deadlines and overdue checks, see the guide to IF formulas with dates.
The text-versus-number trap#
When Excel compares a number with text, the text always wins: any text is treated as greater than any number. So if sales were imported as text, ="9800">10000 returns TRUE, and the formula gives the wrong answer without any error.
Signs that numbers are stored as text:
- They sit on the left of the cell instead of the right.
- A small green triangle appears in the corner of the cell.
- SUM of the column returns 0.
Fix the data with VALUE in a helper column, =VALUE(B2), or select the column and use Data > Text to Columns > Finish. Blank cells cause the opposite problem: they count as 0, so =IF(B2>0,...) treats an empty cell as "not greater". When the text you're testing is a word, not a number, see IF with text.
How to count or sum values greater than a number#
IF works one row at a time. To count or total all the values above a limit, use COUNTIF or SUMIF with the operator in quotes:
| Question | Formula | Result |
|---|---|---|
| How many reps sold more than 10,000? | =COUNTIF(B2:B6,">10000") | 3 |
| Total sales above 10,000 | =SUMIF(B2:B6,">10000") | 38,800 |
| How many sold at least 15,000? | =COUNTIF(B2:B6,">=15000") | 1 |
Notice the different syntax: inside COUNTIF the operator and number go together in quotes. The guide to COUNTIF greater than explains this in detail, including how to use a cell as the limit.
Practise it#
Greater-than tests are the first thing most Excel assessments check, because they show whether you read the rule precisely. Practise TRUE, FALSE and comparisons in a live spreadsheet: you type the formula and it checks it instantly. Then practise the IF function, and see more simple IF then examples to copy.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Did Lin hit the target? Hitting it exactly counts. Click D4 and write an IF that shows Hit if sales in B4 are greater than or equal to the target in C4, otherwise Missed.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Result | ||||
| 2 | |||||
| 3 | |||||
| 4 | |||||
| 5 | |||||
| 6 | |||||
| 7 | |||||
| 8 | |||||
| 9 |
Tip: Use >= so that equal values pass: B4>=C4.
Practise this in a lesson
Frequently asked questions
How do I write an IF greater than formula in Excel?
Use > in the test: =IF(A2>100,"Over","Not over"). The cell shows Over when A2 is more than 100 and Not over otherwise, including when A2 is exactly 100.
How do I write greater than or equal to in Excel?
Use >= with no space: =IF(A2>=100,"Pass","Fail"). The order matters: => is not a valid operator and Excel will reject the formula.
How do I check if one cell is greater than another?
Compare the two cells directly: =IF(B2>C2,"Higher","Not higher"). To compare every row with one fixed cell, lock it with dollar signs, for example B2>$F$1.
Why does my IF greater than formula give the wrong result?
The most common cause is numbers stored as text. Excel treats any text as greater than any number, so "50">100 is TRUE. Convert the cells to numbers with VALUE or Text to Columns.
How do I return a calculation if a value is greater than a limit?
Put the calculation in the true argument without quotes: =IF(B2>40,(B2-40)*1.5,0) returns overtime hours at time and a half when hours exceed 40.