ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Math
  3. Turn Negative Numbers Into Zero in Excel

Turn Negative Numbers Into Zero in Excel

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

Use =MAX(0,A2). MAX returns the larger of 0 and the value in A2, so any negative number becomes zero and positive numbers stay the same. Wrap a calculation the same way: =MAX(0,B2-C2). An IF formula, =IF(A2<0,0,A2), does the same job. A number format can hide negatives, but it does not change the stored value.

Key takeaways

  • =MAX(0,A2) is the shortest way to replace a negative number with zero.
  • Wrap a whole calculation: =MAX(0,B2-C2) never goes below zero.
  • =IF(A2<0,0,A2) does the same and lets you show something else, such as a blank.
  • A custom number format only changes what you see; formulas still use the negative value.
  • To add only the positive numbers, use =SUMIF(range,">0").
On this page+
  1. The sample data
  2. Method 1: MAX(0, value)
  3. Method 2: IF the value is below zero
  4. Which method should you use?
  5. A common mistake: MAX with a whole range
  6. How to show negatives as zero without changing them
  7. How to change the original numbers in place
  8. How to sum or count only the positive numbers
  9. Practise it

To turn Excel negative numbers to zero, use =MAX(0,A2): it returns whichever is bigger, 0 or your number, so negatives become zero and everything else stays the same. It's one short formula, and it also works around a whole calculation, like stock left after orders. This guide shows the MAX and IF methods, how to hide negatives without changing them, and how to total only the positive values.

The sample data#

All the examples use this stock list. Left should show how many items remain, but you can't have fewer than zero items on the shelf.

ABC
1ProductStockOrdered
2Pens5035
3Notebooks2028
4Folders1212
5Staplers815
6Markers4022

A plain =B2-C2 filled down gives 15, -8, 0, -7 and 18. The two negative results are the problem.

Method 1: MAX(0, value)#

MAX returns the largest of the values you give it. Give it 0 and your number, and the answer can never be below 0. In D2, type:

Excel formula
=MAX(0,B2-C2)

Fill it down (Windows: Ctrl+D; Mac: ⌘D). The results are:

ProductB-C=MAX(0,B-C)
Pens1515
Notebooks-80
Folders00
Staplers-70
Markers1818

How it works for Notebooks: MAX looks at 0 and -8 and returns the bigger one, 0. For Pens it looks at 0 and 15 and returns 15.

If the value is already in a cell, the formula is even shorter: =MAX(0,A2). The order of the two values doesn't matter; =MAX(A2,0) gives the same result. The MAX function guide covers the other ways to use MAX.

Method 2: IF the value is below zero#

IF does the same job in a way that reads like a sentence: "if the result is below zero, show 0, otherwise show the result."

Excel formula
=IF(B2-C2<0,0,B2-C2)

This gives exactly the same results as the MAX version. It is longer, because the calculation appears twice, but IF has one advantage: you can return anything you like for negatives. The IF function guide explains the three parts.

GoalFormula
Show 0 for negatives=IF(A2<0,0,A2)
Show a blank for negatives=IF(A2<0,"",A2)
Show a word for negatives=IF(A2<0,"Reorder",A2)

A blank made with "" is really empty text. The guide to IF blank formulas explains how that differs from a truly empty cell, and returning a blank instead of zero from VLOOKUP solves the opposite problem.

Which method should you use?#

Use MAX for the simplest result. Use IF when you want something other than zero.

MAXIF
Formula lengthShortLonger, calculation written twice
Can show a blank or textNoYes
Easy to read for beginnersOnce you know the trickReads like a sentence
Works in every Excel versionYesYes

For an upper limit too, combine MAX with MIN. =MIN(100,MAX(0,A2)) keeps a value between 0 and 100, which is handy for percentages or scores. For checks like "between 50 and 100", see IF between two numbers.

A common mistake: MAX with a whole range#

MAX works one row at a time in this trick. If you give it a whole range, it returns one number, not a list. For example, in Microsoft 365 =MAX(0,B2:B6-C2:C6) returns 18, the largest single difference, in a single cell. That is not what you want.

In Excel 2021 or Microsoft 365, you can still get a whole column of results from one formula with IF, because IF works on each value in turn:

Excel formula
=IF(B2:B6-C2:C6<0,0,B2:B6-C2:C6)

This spills five results down the column: 15, 0, 0, 0 and 18. In older versions, use the one-row MAX formula and fill it down.

How to show negatives as zero without changing them#

A custom number format changes how a number looks, not its value. Select the cells, press Ctrl+1 (Mac: ⌘1), choose Custom and type:

0;"0";0

A number format has up to three sections separated by semicolons: positive; negative; zero. Here the negative section shows the text 0 instead of the number. The cell displays 0, but the stored value is still -8, and any formula that uses the cell still sees -8.

Use this only for display, such as a printed report where negatives would confuse readers. If the zero must count in totals, use MAX or IF.

How to change the original numbers in place#

A formula can't change the cell it reads from, so use a helper column and paste the values back:

  1. In an empty column, write =MAX(0,B2) and fill it down.
  2. Copy the helper column (Ctrl+C; Mac: ⌘C).
  3. Select the first cell of the original column and use Paste Special > Values (Windows: Ctrl+Alt+V, then V; Mac: ⌃⌘V).
  4. Delete the helper column.

The original column now holds plain numbers with no negatives. The old values are gone, so keep a copy of the raw data if you might need the negatives later.

How to sum or count only the positive numbers#

Sometimes you don't need the zeros in the sheet, just a total that ignores negatives. SUMIF does this in one cell:

Excel formula
=SUMIF(D2:D6,">0")

If column D holds the plain differences (15, -8, 0, -7, 18), the result is 33. The negatives are skipped. To count how many items ran short, use =COUNTIF(D2:D6,"<0"), which returns 2.

The same "never below a limit" idea appears in trackers, such as counting days left before something expires. The expiry date tracker uses it to stop overdue items showing negative days.

Practise it#

Try the exercise on this page: one MAX formula keeps the stock count at zero. Then go back to basics with your first formulas to get comfortable with calculations like B2-C2, and practise the IF function in a live spreadsheet to return zeros, blanks or words. Every formula you type is checked instantly.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Notebooks sold more than were in stock. In D3, work out the stock left as B3-C3, but never below zero, using MAX. Then press Enter.

fx
ABCDE
1
Product
Stock
Ordered
Left
2
Pens
50
35
3
Notebooks
20
28
4
Folders
12
12
5
Staplers
8
15
6
Markers
40
22
7
8
9

Tip: MAX picks the bigger of two values. Give it 0 and the calculation B3-C3.

Practise this in a lesson

LessonFreeYour first formulasType values, write formulas that start with =, and see how they recalculate.LessonThe IF functionMake a cell show one result or another depending on a condition, like Pass/Fail or Over/Under budget.Function guideMAXFind the largest value in Excel with MAX: top sales, latest dates and the rep behind them. Common mistakes, plus a live exercise to try.Function guideIFLearn Excel's IF function with practical examples: flag budgets, label rows and return blanks. Avoid the classic mistakes and practice live.

Frequently asked questions

How do I make negative numbers zero in Excel?

+

Use =MAX(0,A2) in a new column. It returns 0 for any negative value and the original number for zero or positive values. Fill it down for the whole list.

How do I stop a formula from going below zero?

+

Wrap the calculation in MAX with 0: =MAX(0,B2-C2). If B2-C2 is negative, the cell shows 0; otherwise it shows the result.

Can I change negative numbers to zero without a helper column?

+

Not with a formula in the same cell as the data. Calculate in a helper column, copy it, then use Paste Special > Values over the original column and delete the helper.

How do I show negative numbers as blank?

+

Use IF: =IF(A2<0,"",A2). The cell looks empty for negatives. Remember that "" is text, so some formulas treat it differently from a truly empty cell.

How do I sum only the positive numbers in Excel?

+

Use SUMIF with ">0" as the criteria: =SUMIF(D2:D6,">0"). It adds every number above zero and ignores the negatives.

Sources

  • MAX function - Microsoft Support
  • IF function - Microsoft Support
  • Create a custom number format - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. The sample data
  2. Method 1: MAX(0, value)
  3. Method 2: IF the value is below zero
  4. Which method should you use?
  5. A common mistake: MAX with a whole range
  6. How to show negatives as zero without changing them
  7. How to change the original numbers in place
  8. How to sum or count only the positive numbers
  9. Practise it

Keep reading

Logic· 7 min read

IF Between Two Numbers in Excel

To check if a number is between two values in Excel, combine IF with AND: =IF(AND(B2>=1,B2<=5),"Standard","Other"). AND needs both tests to be true: at least the lower limit and at most the upper limit. Use > and < instead to leave out the limits themselves. Excel has no BETWEEN function, so you always write both tests.

Lookups· 6 min read

VLOOKUP Return Blank Instead of 0

VLOOKUP shows 0 when the cell it returns is empty. To return a blank instead, test the result and swap it for empty text: =IF(VLOOKUP(E2,A2:C6,3,FALSE)="","",VLOOKUP(E2,A2:C6,3,FALSE)). A shorter trick is =VLOOKUP(E2,A2:C6,3,FALSE)&"", but that turns numbers into text. In Microsoft 365, LET avoids repeating the lookup.

Dates· 6 min read

Expiry Dates in Excel: Days Left and Status Flags

An expiry date formula in Excel usually has three parts. Work out the expiry date with =EDATE(B2,12) for 12 months after the issue date. Count the days left with =C2-TODAY(). Then flag the status with =IF(C2<TODAY(),"Expired",IF(C2-TODAY()<=30,"Expiring soon","OK")). Because TODAY updates daily, the tracker stays current by itself.

More on math

  • NPV Function in Excel: Net Present Value Explained
  • Percent Change Formula in Excel (With Examples)
  • Percentage Formula in Excel: 5 Everyday Calculations
  • How to Calculate Percentage of Total in Excel
  • PERCENTILE and QUARTILE in Excel, Explained Simply
  • PMT Function in Excel: Calculate a Loan Payment
All math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free