The absolute value of a number is its distance from zero on the number line, always returned as a non-negative quantity regardless of whether the original number is positive or negative. Written with vertical bars as |x|, it simply strips the sign: |7| equals 7, |-7| also equals 7, and |0| is 0. This idea scales up naturally: |3 minus 10| equals |-7| equals 7, which is the absolute difference between 3 and 10, or equivalently the distance between those two points on the number line. This calculator handles both uses. In single-number mode you enter one value and get back its absolute value, its distance from zero, and the sign of the original number. In difference mode you enter two numbers and the calculator evaluates the absolute value of their difference, |a minus b|, which is the same as the distance between a and b regardless of order. You can enter negative numbers, decimals, and zero in either field. The absolute value concept appears throughout mathematics and its applications: in error analysis it measures how far a measurement deviates from the truth; in statistics it appears in mean absolute deviation; in geometry it gives distances; in programming it is a built-in function for handling magnitudes. This tool is useful for students learning about absolute value for the first time, for checking arithmetic, and for quickly computing absolute differences between two quantities. It does not evaluate general algebraic expressions such as |x squared minus 5|; for those you would substitute a numeric value for x first.
Leave the second field blank for a single absolute value. Enter both fields to compute |a − b|, the distance between two numbers.
When only one value is entered the calculator returns Math.abs(a), which is a if a is positive or zero, or -a if a is negative. The distance from zero is identical to the absolute value. The sign label reports Positive, Negative, or Zero based on the original input. When a second value b is entered, the calculator computes |a minus b|: it subtracts b from a and then takes the absolute value of the result. This is commutative, meaning |a minus b| always equals |b minus a|, so the order you enter the values does not affect the distance result.
Using the default value a = -7.5 with no second value: |-7.5| = 7.5. The number is 7.5 units from zero on the number line. The original number is negative. To also demonstrate the difference mode: enter a = 3 and b = 10 to get |3 minus 10| = |-7| = 7, confirming the distance between 3 and 10 is 7 units.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.