Excel returns the absolute value of any number with a single built-in function: =ABS(value). The ABS function strips the minus sign from a number and returns its distance from zero, so =ABS(-12) shows 12, =ABS(12) shows 12, and =ABS(0) shows 0. It works on whole numbers, decimals, and the result of another formula, and it accepts both a literal number and a cell reference as its argument. Because absolute value is the standard way to express magnitude without direction, ABS shows up in finance, statistics, science, and engineering workbooks whenever the user needs size instead of sign — from averaging signed returns to computing measurement error. The function takes one argument and returns one number, which makes it one of the shortest formulas in Excel and one of the easiest to remember. This guide walks through how to write the ABS function, how to nest it inside larger formulas, alternative approaches that produce the same answer, and a browser-based tool that handles the same calculation without opening a spreadsheet at all.

The Excel ABS Function at a Glance
ABS lives in Excel's Math and Trigonometry function library and has been part of every desktop version since the early days of the application. Its full syntax is ABS(number), where number is the only argument. That argument can be a numeric literal, a cell reference, a named range that resolves to a number, or the output of another expression nested inside the call. ABS always returns a non-negative real number, treats positive inputs and zero as already absolute, and rounds its output to the same display precision as the cell format. Because the function inherits the precision of the value passed in, ABS does not change 7.5 to 8 or 7 — it returns exactly the magnitude of the input, no rounding unless the cell is formatted that way. The function does not accept text, logical values, or empty cells directly; passing a non-numeric value produces a #VALUE! error, which is usually a sign that the referenced cell is blank or formatted as text.
How to Use the ABS Function in Excel
- Click the cell where you want the absolute value to appear, for example C2.
- Type =ABS( to start the formula; the opening parenthesis belongs to the function.
- Enter the argument: a literal number such as -7.5, a cell reference such as A2, or a larger expression such as A2-B2.
- Close the parenthesis with ) and press Enter; Excel returns the magnitude immediately.
- Drag the fill handle in the bottom-right corner of the cell down or across to copy the ABS call to an entire column or row of values.
For a quick sanity check, type =ABS(-7.5) into any empty cell; the cell reads 7.5 the moment Enter is pressed, confirming the function is wired up correctly. Once the formula is in place, editing the source cell updates the absolute value automatically, which is what makes ABS useful for live calculations.
Other Excel Methods That Produce the Same Result
Three workarounds return the absolute value when ABS is unavailable or when the goal is to demonstrate the rule. The MAX trick pairs the original number with its negation and returns the larger of the two — because at least one of the pair is non-negative, MAX always yields the absolute value. The IF approach spells out the rule: if the number is negative, flip the sign; otherwise, return it unchanged. Paste Special is a non-formula conversion that rewrites a range of mixed values into all-positive numbers without adding a helper column at all.
| Method | Formula or Action | Best Used When |
|---|---|---|
| ABS function | =ABS(A2) | You want a live, formula-driven result that updates as the source changes |
| MAX trick | =MAX(A2,-A2) | A quick demonstration that needs no function name at all |
| IF statement | =IF(A2<0,-A2,A2) | Teaching the underlying sign-flip logic in a self-documenting way |
| Paste Special | Copy -1, then Paste Special > Multiply on a range | Converting a static list to all-positive values without a helper column |
All four approaches return the same number for the same input. ABS is the most readable for new workbooks; the MAX and IF versions are useful when ABS has been overwritten or restricted, and Paste Special is the right tool when the values themselves need to change, not the formula that references them.
Common Excel Scenarios That Need Absolute Value
Absolute value is the quiet workhorse behind many everyday spreadsheet tasks. Comparing two dates, prices, or counts usually means wanting the gap, not who is bigger — =ABS(A2-B2) returns the unsigned distance in a single cell. Averaging signed numbers such as daily profit-and-loss returns inflates the average toward zero when positives and negatives cancel out, so analysts wrap each value in ABS first, often with a helper column or a modern dynamic-array formula. Risk and volatility work often begins with |x − mean| before squaring the deviations for variance. Quality-control sheets track absolute error, ABS(measured − expected), in place of signed error so over- and under-shoots are weighted equally. Even budget reviews use ABS to compare actual and forecast numbers without flagging which side is over budget.
A concrete example: with the measured value 4.2 in cell A2 and the expected value 4.0 in B2, the formula =ABS(A2-B2) returns 0.2. The same formula with A2 = 3.9 and B2 = 4.0 also returns 0.1, because ABS hides the direction of the mistake and reports only its size — exactly what most error-tracking sheets need. Without ABS, the first example would show -0.2 and the second would show +0.1, and any later SUM or AVERAGE step would treat them as signed numbers instead of pure magnitudes.
When an Online Tool Saves the Spreadsheet Step
For one-off checks outside a workbook — verifying a homework problem, sanity-checking a measurement, or quickly showing someone what |−3.14| equals — opening Excel and typing a formula can feel like overkill. The Absolute Value Calculator takes a single number, including negatives, decimals, and scientific notation like 1.2e4, and displays |x| the moment you stop typing. There is no button to click, the result updates live as you edit, and a Copy button puts the answer on your clipboard for pasting into a chat, an email, or back into a cell. For spreadsheet work, ABS still wins because it scales to thousands of rows; for one number, the browser tool finishes the job without a workbook, runs entirely in your browser so nothing is uploaded, and supports values up to about 1.8 × 10³⁰⁸ before flagging that the number has exceeded the range a computer can store.
The Math Behind |x|
The vertical-bar notation |x| is shorthand for "the distance of x from zero on the number line." Because distance is never negative, |x| ≥ 0 for every real x, with equality only when x = 0. Formally, |x| = x when x ≥ 0 and |x| = −x when x < 0, which is the exact rule Excel's IF version reproduces. A handy algebraic shortcut is |x| = √(x²): squaring a real number removes its sign, and the principal square root returns the non-negative root, so the result is always the same magnitude. A few identities follow directly: |x| = |−x| (a number and its opposite share one absolute value), |xy| = |x|·|y|, and |x| − |y| ≤ |x − y| (the triangle inequality). These identities are why |x − y| is the standard one-dimensional distance between two points and why mean absolute error — defined as the average of |xᵢ − mean| — is a more robust statistic than mean squared error when outliers are present. Whenever an Excel workbook uses ABS, the formula is implementing one of these rules directly, which is why ABS pairs so naturally with SUM, AVERAGE, and the IF function in working spreadsheets.
If you're weighing options, How to Calculate Age from Date of Birth in Excel covers this in detail.