How to Do Absolute Value in Excel: ABS Function, Formulas, and Examples

Learn how to do absolute value in Excel using the ABS function. Covers syntax, SUMPRODUCT, IF, ROUND combos, array formulas, and real-world examples.

Microsoft ExcelBy Katherine LeeMay 27, 202614 min read
How to Do Absolute Value in Excel: ABS Function, Formulas, and Examples

What Is Absolute Value in Excel?

If you've ever needed to measure the distance between two numbers without caring about direction — positive or negative — you're already thinking about absolute value. In math, the absolute value of a number is its non-negative equivalent. |-5| equals 5, and |5| also equals 5. That distance-from-zero concept turns out to be extremely useful when you're working with spreadsheets.

Think about it this way: if your budget was $500 and you spent $520, the variance is -$20. If you spent $480, the variance is +$20. Both represent a $20 deviation — but one is negative and one positive. If you want to compare deviations without the sign getting in the way, you need absolute values.

In Excel, the built-in ABS function handles this for you. It strips any negative sign from a number and returns the positive version. There's no complicated setup — one function, one argument, and you're done.

This guide covers how to do absolute value on Excel using ABS, the most practical formula combinations you'll reach for day to day, and a few points of confusion worth clearing up — like the difference between an absolute value and an absolute cell reference.

The ABS Function: Syntax and Basic Usage

The syntax is about as clean as it gets in Excel:

=ABS(number)

The number argument can be a literal value, a cell reference, or any formula that returns a number. Here's what that looks like:

  • =ABS(-15) returns 15
  • =ABS(15) returns 15 (already positive — no change)
  • =ABS(0) returns 0
  • =ABS(A1) returns the absolute value of whatever is in A1
  • =ABS(A1-B1) returns the positive difference between A1 and B1

That last formula is where ABS earns its keep. If A1 is 50 and B1 is 63, the difference is -13. Wrap it in ABS and you get 13 — the magnitude of the gap, no sign attached. Whether the actual value went up or down doesn't matter; you only care about how far it moved.

ABS is also completely safe when applied to zero or positive numbers. It doesn't change them — it just guarantees the result is non-negative. That makes it safe to use defensively even when you're not certain whether your input will be negative.

You can nest ABS inside almost any other function, which opens up a whole range of useful patterns. The sections below cover the most common combinations you'll actually use. You don't need to memorize all of them — once you understand the core pattern, the variations become intuitive.

One thing worth noting early: ABS is a worksheet function, not a formatting option. It doesn't just display a number differently — it actually returns a new value. So if you use =ABS(A1) in cell B1, changing the sign of A1 will update B1 automatically. The output is always a live calculation, not a one-time conversion.

That's different from, say, multiplying by -1 in a paste-special operation. ABS in a formula stays dynamic. If your source data changes, the absolute value updates with it. This matters when you're building dashboards or reports that refresh regularly from updated data sources. It's one of those small things that separates a static spreadsheet from a properly live one.

Microsoft Excel - Microsoft Excel certification study resource

ABS Function Quick Reference

  • Syntax: =ABS(number)
  • =ABS(-15) returns 15
  • =ABS(A1) returns the absolute value of cell A1
  • =ABS(A1-B1) returns the positive difference between two cells
  • Works with literals, cell references, or nested formulas
  • Returns 0 for zero inputs, unchanged value for positives

ABS Formulas by Use Case

=ABS(A1) — converts any number to its non-negative equivalent. Apply to a single cell or a formula result. Safe on positive numbers: they pass through unchanged.

=ABS(-15) returns 15. =ABS(15) returns 15. =ABS(0) returns 0. The result is always ≥0.

=ABS(A1-B1) — most common pattern. Returns the positive difference between two values regardless of which is larger. Use this in variance analysis, deviation tracking, and budget comparisons.

Common ABS Use Cases with Formula Examples

The ABS function looks trivial at first glance, but it shows up constantly in real spreadsheet work. Here are the situations where you'll reach for it most often.

Calculating Variance Without Negative Signs

Say you're comparing actual sales to target sales across 20 rows. A plain subtraction like =A1-B1 gives you positive or negative results depending on which value is larger. That's useful for directional analysis — knowing whether you're over or under target — but if you want to know how far off each row is regardless of direction, wrap it:

=ABS(A1-B1)

This formula tells you the magnitude of the deviation without positive and negative values canceling each other out in downstream calculations. In a summary row, =SUM(ABS(A1:A20)-something) via SUMPRODUCT would give you total absolute variance, not net variance.

This pattern is also handy in data analysis in Excel when you're computing mean absolute error or measuring forecast accuracy. Error values that are both positive and negative cancel out in a straight average — absolute values don't.

Summing Absolute Values Across a Range

Here's a formula that trips people up: =SUM(ABS(A1:A10)) doesn't work the way you'd expect in older Excel versions. The issue is that SUM expects a pre-calculated range, not an array operation that needs to be applied cell by cell.

The reliable workaround in any Excel version is SUMPRODUCT:

=SUMPRODUCT(ABS(A1:A10))

SUMPRODUCT handles arrays natively. It applies ABS to each cell individually, then sums the results. No special entry needed — type it normally and press Enter.

In Excel 365 and Excel 2021, dynamic array support means =SUM(ABS(A1:A10)) works directly without any workaround. If you're on a modern subscription version, you can use either. But if your workbook gets shared with people on Excel 2016 or 2019, SUMPRODUCT is the safer default.

Finding the Largest Deviation

Combine ABS with MAX to surface the biggest absolute gap in a dataset:

=MAX(ABS(A1:A10))

In Excel 365 this works as a standard formula. In older Excel versions, you'd enter it as an array formula using Ctrl+Shift+Enter, which adds curly braces automatically: {=MAX(ABS(A1:A10))}. Don't type the braces yourself — they appear when you use the keyboard shortcut.

This is useful when you want to identify the worst-case deviation in a range without scanning through each row manually. Pair it with INDEX/MATCH to also find which cell contains that maximum absolute deviation.

Conditional Tolerance Checks

A practical pattern in quality control and financial modeling is checking whether two values are within an acceptable tolerance. ABS makes the formula clean:

=IF(ABS(A1-B1)>0.05, "Out of range", "OK")

If the absolute difference between A1 and B1 exceeds 0.05, the cell flags the row. You can also tie this into COUNTIFS in Excel to count how many rows fall outside tolerance — useful for automated status reports.

The tolerance threshold is just a number you adjust. For financial rounding checks you might use 0.01. For engineering specs you might use 0.001. The pattern stays the same regardless.

Quick ABS Patterns for Range Calculations

  • =SUMPRODUCT(ABS(A1:A10)) — sum of absolute values, works in all Excel versions
  • =MAX(ABS(A1:A10)) — largest absolute value; needs Ctrl+Shift+Enter in Excel 2016/2019
  • =ABS(A1-B1)/A1 — positive percentage difference, no negative signs in output
  • =COUNTIF range with ABS tolerance — count rows outside an acceptable deviation threshold

Percentage Difference and Error Rates

When you're computing percentage difference between two values, absolute value matters:

=ABS(A1-B1)/A1

Without the ABS, you can get a negative percentage — technically correct, but visually confusing in dashboards. Wrapping the numerator in ABS gives you the deviation as a positive percentage regardless of which direction the change went.

Same logic applies to mean absolute percentage error (MAPE) in forecasting models. If you're using Excel for demand planning or budget tracking, ABS is something you'll use in nearly every error metric.

Using ABS in Conditional Formatting

ABS doesn't just work in formulas — you can use it in conditional formatting rules to highlight cells based on their absolute deviation. Go to Home > Conditional Formatting > New Rule, choose “Use a formula to determine which cells to format,” and enter something like:

=ABS(A1-$B$1)>10

This highlights any cell in column A that deviates from the value in B1 by more than 10, regardless of whether the deviation is positive or negative. It's a clean way to flag outliers visually without manually scanning data.

The same approach works in data validation. If you want to prevent a user from entering a value that differs from a reference by more than a threshold, an ABS-based custom formula in the data validation rule catches both over and under by the same amount.

ABS in Multi-Step Formulas

You'll often want ABS as just one step in a longer calculation. For example, computing a running absolute deviation from a mean:

=ABS(A1-AVERAGE($A$1:$A$20))

This gives you how far each value is from the group average, always as a positive number. Summing that column and dividing by the count gives you mean absolute deviation — a useful spread metric that's less sensitive to outliers than standard deviation.

Or consider a formula that combines absolute deviation with a percentage cap:

=MIN(ABS(A1-B1)/B1, 1)

This calculates the percentage deviation, but caps it at 100% — useful in dashboards where extreme values would otherwise distort a percentage column. The MIN wrapper prevents any single row from reading over 100%, while ABS ensures the percentage is always positive.

These kinds of multi-step formulas are where understanding ABS pays off most. It's not just about converting -5 to 5 — it's about confidently using it as a building block in more involved calculations without breaking the logic.

Excellence Playa Mujeres - Microsoft Excel certification study resource

5 ABS Formula Combinations Worth Knowing

ABS Alone

=ABS(A1) — converts any number to its non-negative equivalent. The foundation of every other pattern here. Safe to use on positive numbers — they pass through unchanged.

ABS + SUMPRODUCT

=SUMPRODUCT(ABS(A1:A10)) — sums absolute values across a range. Works in all Excel versions without array entry. Preferred over SUM(ABS()) for cross-version compatibility.

ABS + IF

=IF(ABS(A1-B1)>tolerance, "Out of range", "OK") — tolerance check. Replace tolerance with your threshold (e.g., 5, 0.1, 100). Core pattern for quality control dashboards.

ABS + ROUND

=ROUND(ABS(A1), 2) — absolute value rounded to 2 decimal places. Use when you need clean display of financial differences without trailing decimals or negative signs.

Array Formula (Legacy Excel)

{=SUM(ABS(A1:A10))} — entered with Ctrl+Shift+Enter in Excel 2016/2019. In Excel 365, =SUM(ABS(A1:A10)) works without special entry. Use SUMPRODUCT version for broadest compatibility.

When to Use ABS in Your Formulas

  • Use =ABS(A1-B1) any time you need the magnitude of a difference, not just the direction — positive and negative cancel out in sums otherwise
  • Use =SUMPRODUCT(ABS(range)) to sum absolute values across a range — works in all Excel versions without array entry, unlike SUM(ABS())
  • Use =IF(ABS(A1-B1)>threshold, "Flag", "OK") for tolerance checks in quality control workflows or financial budget reviews
  • Use =ABS(VLOOKUP(...)) when your lookup table might return negative numbers but you only care about the magnitude, not the sign
  • Use =MAX(ABS(range)) to find the single largest deviation in a dataset — use array entry in Excel 2016/2019
  • Switch to =SUM(ABS(range)) directly if you're on Excel 365 — no SUMPRODUCT workaround needed with dynamic arrays
  • Use =ROUND(ABS(A1), 2) when you need a clean positive number with limited decimal places for display in reports
  • Apply ABS in conditional formatting custom formulas to highlight cells based on deviation from a benchmark or reference value
  • Remember: $A$1 is an absolute cell reference used to lock formula addressing — completely different from absolute value math
  • Wrap ABS with IFERROR when input data may include text or blank cells to prevent #VALUE! errors from breaking your formulas

ABS Function at a Glance

📐=ABS(number)Core syntax — one argument, always returns the non-negative equivalent of any numeric input
SUMPRODUCTMost compatible function to combine with ABS for summing a range of absolute values in any Excel version
🔢Excel 365Dynamic array support means =SUM(ABS(range)) works without Ctrl+Shift+Enter or SUMPRODUCT workaround
⚠️$A$1 ≠ ABSAbsolute cell reference locks a formula address when copying — completely unrelated to the ABS math function
📊MAPE & MADABS is used in most forecast error metrics including mean absolute percentage error and mean absolute deviation
🔄MAX(A1,0)Floors negative values at zero rather than flipping their sign — different use case from ABS, not a substitute

ABS Function vs Manual Approaches

Pros
  • +Single clean function — =ABS(number) is readable and self-documenting
  • +Works with any number: literal, cell reference, or nested formula result
  • +Safe on positives — passes them through unchanged without extra IF logic
  • +Nests easily inside SUMPRODUCT, IF, MAX, ROUND, VLOOKUP, and others
  • +Dynamic — updates automatically when source data changes
  • +Available in all Excel versions (2007 through 365)
  • +Works in Excel array formulas with Ctrl+Shift+Enter in legacy versions
  • +No performance overhead — single-pass calculation, no iteration
Cons
  • Returns #VALUE! error on text input — needs IFERROR wrapper in mixed data
  • SUM(ABS(range)) requires Ctrl+Shift+Enter in Excel 2016/2019 — use SUMPRODUCT instead
  • Doesn't distinguish between 'was negative' and 'was positive' — sign info is lost
  • MAX(ABS(range)) needs array entry in legacy Excel — can confuse less experienced users
  • Spill behavior in Excel 365 (=ABS(A1:A10)) won't work in older versions of Excel
Excel Spreadsheet - Microsoft Excel certification study resource

Absolute Value vs Absolute Cell Reference — Two Different Things

This is probably the most common point of confusion for people who are new to Excel, and it's worth spelling out clearly: absolute value and absolute cell reference are completely unrelated concepts. They share a word, but that's it.

What an Absolute Cell Reference Does

When you see $A$1 in a formula, the dollar signs have nothing to do with mathematics or negative numbers. It's a cell-locking mechanism.

By default, Excel uses relative references. When you write =A1*2 in cell C1 and then copy that formula down to C2, Excel adjusts it automatically to =A2*2. That's relative referencing — the formula adapts as you move it.

Adding dollar signs prevents that shift. =$A$1*2 in C1 stays =$A$1*2 in C2, C3, C10 — it always refers to A1. You'll use this when you have a constant value in one cell (a tax rate, a conversion factor, a fixed price) that you want every formula in a column to reference without it shifting.

You can also use mixed references: $A1 locks the column but lets the row shift, and A$1 locks the row but lets the column shift. These are for more advanced copy-down/copy-across table patterns.

None of this has anything to do with positive or negative numbers.

What Absolute Value Does

The ABS function is pure math. =ABS(number) converts any number to its non-negative equivalent. It doesn't affect cell addressing, copy behavior, or anything structural in the spreadsheet. It just strips the sign from a number.

So: if someone tells you to “use an absolute reference,” they mean $A$1. If they say “use absolute value,” they mean =ABS(). These live in completely separate parts of Excel's feature set.

Converting Negatives to Positives: a Few Approaches

ABS is the most direct way to turn a negative into a positive, but there are alternatives worth knowing:

  • =ABS(A1) — true absolute value. Returns the positive version of any number, positive or negative.
  • =MAX(A1, 0) — floors at zero. Returns the number if it's positive, or 0 if it's negative. Not the same as absolute value: -5 becomes 0, not 5. Use when you want to ignore negatives, not invert them.
  • =IF(A1<0, -A1, A1) — manual absolute value logic. Identical result to ABS() but more verbose. Useful if you're explaining the logic in a cell comment or teaching someone how it works.
  • =-1*MIN(A1, 0)+MAX(A1, 0) — overly complex, but some older spreadsheets use it. ABS is always simpler.

Negative Numbers to Positive: When to Use Which

If you're converting a column of potentially negative financial figures to show magnitudes, ABS is the right tool. If you're building a model where negatives represent losses and you want to zero out losses rather than flip their sign, MAX(value, 0) is what you want.

The distinction matters in financial modeling. ABS(-50) gives you 50. MAX(-50, 0) gives you 0. They answer different questions.

Absolute Value vs Absolute Cell Reference

📐=ABS()Mathematical function — strips the negative sign from a number, returns positive equivalent
🔒$A$1Cell locking — prevents the cell address from shifting when you copy a formula to another cell
📊Math conceptABS is about distance from zero — the non-negative version of any numeric input value
📋Formula feature$A$1 is about referencing — controlling which cell a formula points to after being moved or copied

Excel 365 Dynamic Arrays and ABS

If you're on Excel 365, dynamic arrays change how some ABS formulas behave. Formulas that previously required Ctrl+Shift+Enter to run as array formulas now work without that step.

=SUM(ABS(A1:A10)) just works in Excel 365. =MAX(ABS(A1:A10)) just works. You don't need SUMPRODUCT as a workaround anymore — though SUMPRODUCT still works fine if you prefer it for compatibility.

The spill behavior also means you can write =ABS(A1:A10) in a single cell and Excel outputs all 10 results automatically into adjacent cells below — no need to pre-select a range. This is a significant quality-of-life improvement for anyone who's been manually applying ABS row by row.

If you collaborate with people on older Excel versions, keep in mind that spilled array formulas won't work for them. Either use SUMPRODUCT for shared workbooks, or add a compatibility note.

ABS with VLOOKUP and Other Lookup Functions

Nesting ABS around lookup functions is straightforward. If your VLOOKUP might return a negative number and you only care about the magnitude:

=ABS(VLOOKUP(A1, lookup_table, 2, FALSE))

Same pattern works with XLOOKUP, INDEX/MATCH, and any other lookup that returns a number. The outer ABS just guarantees the final result is non-negative, whatever the lookup returns.

Understanding Excel pivot tables alongside functions like ABS gives you a full toolkit for summarizing data — pivot tables handle aggregation and grouping, while ABS handles sign normalization before or after aggregation.

If you've worked through tasks like learning to separate first and last name in Excel, you'll recognize the same underlying principle at work here: Excel has a clean, dedicated function for almost every common transformation. ABS is the one for sign removal. Know it exists, know its syntax, and you'll reach for it automatically whenever deviation or magnitude comes up in your work.

Excel Questions and Answers

About the Author

Katherine LeeMBA, CPA, PHR, PMP

Business Consultant & Professional Certification Advisor

Wharton School, University of Pennsylvania

Katherine Lee earned her MBA from the Wharton School at the University of Pennsylvania and holds CPA, PHR, and PMP certifications. With a background spanning corporate finance, human resources, and project management, she has coached professionals preparing for CPA, CMA, PHR/SPHR, PMP, and financial services licensing exams.