Absolute Value Calculator
What is the Absolute Value Calculator?
What this calculator does
Type any number into the single field labeled Number (x) and this calculator returns two lines: |x|, the absolute value of your number, and -|x|, the negative of that value. One input, two results, nothing else to set.
What absolute value means
The absolute value of a number is its distance from zero on the number line. Distance cannot be negative, so an absolute value is never negative either. The number -7 sits seven units from zero, so its absolute value is 7.
The rule the calculator follows
If your number is zero or positive, the absolute value is the number itself. If your number is negative, the absolute value is that number with its sign flipped. Either way, the |x| line reports how far the number sits from zero.
Reading the two result lines
The first line, labeled |x|, is the distance result you usually want. The second line, labeled -|x|, takes that distance and puts a minus sign in front of it, so it is always zero or negative. Students meet that second form constantly in algebra.
Worked example: the page default
The calculator opens with Number (x) set to -7. The |x| line shows 7, because -7 is seven units away from zero. The -|x| line shows -7, the negative of that distance. Notice the coincidence: the second line matches the number you typed.
Worked example: a negative decimal
Enter -12. 5 and the |x| line shows 12. 5, while the -|x| line shows -12. 5. Decimals behave exactly like whole numbers here: the sign is the only thing that changes. The size of the number, including every digit after the decimal point, stays exactly the same.
Worked example: a positive number
Enter 4. 75 and the |x| line simply repeats 4. 75, because a positive number is already its own distance from zero. The -|x| line shows -4. 75. When the input is positive, only the second line changes anything, and it only adds a negative sign.
Worked example: a tiny negative number
Enter -0. 003 and the |x| line shows 0. 003, with the -|x| line showing -0. 003. Results are displayed to eight decimal places, so even very small inputs keep their full size. Smallness does not matter; only the sign decides which of the two rules applies.
Why the first line is never negative
Students sometimes expect |-3| to be -3 because the input was negative. That confuses the number with its distance. Positions on a number line can be negative, but the gap between a position and zero is a length, and lengths are never below zero.
Distance between two numbers, by hand
This page takes one number at a time, so a distance problem needs one subtraction first. To find how far apart -3 and 5 are, subtract: -3 minus 5 is -8. Enter -8 and the |x| line shows 8, the true gap between the two points.
Where absolute value shows up
Weather reports use it for temperature swings, machinists use it for tolerances around a target size, and accountants use it when only the size of a change matters, not its direction. Anywhere a problem asks how much, rather than which way, absolute value is underneath.
Absolute value inside equations
An equation like |x| = 5 has two solutions, 5 and -5, because both sit five units from zero. This calculator gives you the distance for one number you supply; it does not solve equations. Knowing the distance idea tells you why such equations split into two cases.
A common mistake: emptying the bars too soon
The bars group what is inside them, so |-3 + 2| means the absolute value of -1, which is 1, not 5. This page has no way to type an expression, so work out the inside first, then enter that single result as your Number (x).
A common mistake: misreading the second line
The -|x| line is not a second absolute value. The minus sign sits outside the bars, so -|x| is negative whenever x is not zero. For x = -7 it shows -7, and for x = 7 it also shows -7, which surprises many first-time users.
Opposite numbers share one answer
Numbers that mirror each other across zero, like -42 and 42, have the same absolute value: enter either one and the |x| line shows 42. Only the -|x| line keeps a trace of the sign, and it shows -42 for both inputs as well.
Zero is its own absolute value
Enter 0 and both lines show 0. Zero sits exactly on top of itself on the number line, so its distance is zero, and the negative of zero is still zero. It is the one input where the two result lines can never disagree.
The spreadsheet connection
The same operation lives in every spreadsheet as the ABS function, and programmers use it to measure error: subtract a guess from the true value and take the absolute value, and you know how far off the guess was without caring whether it ran high or low.
What this calculator does not do
It accepts a single plain number only. There is no field for an expression, an equation, or a second number, and it will not graph anything. Anything fancier, like |x - 3| for many values of x, has to be built one entered number at a time.
Checking homework with it
The fastest honest check: cover the sign of your handwritten answer and compare sizes. If you computed |-15| as anything except 15, the slip is in the sign step, not the arithmetic. Teachers assign these precisely because the arithmetic is trivial and the concept is the point.
A quick mental shortcut
For a single number, the whole skill is one question: how far is this from zero? If you can answer that, you already know the |x| line before you type. Use the calculator to confirm, and use the -|x| line to practice reading outside minus signs.
The V shape on a graph
Plot y = |x| and the points form a V with its corner at zero: inputs -3, 0, and 3 give absolute values 3, 0, and 3 on this page. The left arm climbs as numbers grow more negative, which is the graph's way of showing distance increasing in both directions.
Comparing sizes after the bars
Absolute value is the right tool when a problem asks which quantity is bigger in size alone. A debt of 900 dollars outweighs a gain of 700 dollars in magnitude: enter -900 and 700 separately and the |x| lines, 900 and 700, settle the comparison without sign confusion.
A note on the notation
The two vertical bars are the whole instruction: work out what is inside, then report its distance from zero. Some courses call the same idea modulus, and older texts write mod x. The labels on this page stick to the bar notation, |x| for the value and -|x| for its negative.
With the pre-filled defaults — Number (x) -7 — the Absolute Value Calculator returns |x| 7. 00000000, -|x| -7. 00000000. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Absolute Value Calculator
- 1Click into the field labeled Number (x) and clear the value already there.
- 2Type your number exactly, including a minus sign if it is negative, such as -12.5.
- 3Read the line labeled |x|: that is the absolute value, the distance of your number from zero.
- 4Read the line labeled -|x| if your problem asks for the negative of the absolute value.
- 5For a distance between two numbers, subtract them yourself first, then enter the difference as Number (x).
- 6For an expression inside bars, such as |-3 + 2|, add or subtract the inside part first and enter that single result.
- 7Check that the |x| line is zero or positive; a negative value there means the input was typed incorrectly.
- 8Try the opposite of your number as well and confirm the |x| line stays the same.
Formula
This is the core equation the Absolute Value Calculator uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Page default | Number (x) = -7: seven units from zero | |x| = 7 and -|x| = -7 |
| Negative decimal | Number (x) = -12.5: the sign flips, the size stays | |x| = 12.5 and -|x| = -12.5 |
| Positive number | Number (x) = 4.75: already its own distance from zero | |x| = 4.75 and -|x| = -4.75 |
| Tiny negative number | Number (x) = -0.003: shown in full at eight decimal places | |x| = 0.003 and -|x| = -0.003 |
Value Reference Table
See how the |x| changes as Number (x) moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Number (x) | |x| | -|x| |
|---|---|---|
| 1 | 1.00000000 | -1.00000000 |
| 2 | 2.00000000 | -2.00000000 |
| 5 | 5.00000000 | -5.00000000 |
| 10 | 10.00000000 | -10.00000000 |
| 20 | 20.00000000 | -20.00000000 |
| 50 | 50.00000000 | -50.00000000 |
| 100 | 100.00000000 | -100.00000000 |
| 250 | 250.00000000 | -250.00000000 |
| 500 | 500.00000000 | -500.00000000 |
| 1,000 | 1000.00000000 | -1000.00000000 |
Practice Problems
Check your understanding of the Absolute Value Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
|-7| = 7: You enter Number (x) -7 — what does the calculator return?
Show AnswerHide Answer
With Number (x) 3.93, what are the results?
Show AnswerHide Answer
|-100|: Number (x) -100 — work it out, then check the answer.
Show AnswerHide Answer
Calculation Progression Roadmap
How the Absolute Value Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Number (x). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates abs(Number (x)) on every keystroke — there is no submit button to press.
Read your results
Your |x| and -|x| appear instantly. With the pre-filled defaults, that is |x| 7.00000000, -|x| -7.00000000. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Quick Facts
- Formula:
|x| = x if x≥0, -x if x<0 - Category: math
- Uses: absolute value, modulus
- Price: Free — no account needed
Frequently Asked Questions
It is always positive or zero, never negative. Absolute value measures distance from zero, and distance cannot fall below zero. The only input that produces zero is zero itself, because zero sits exactly at the starting point of the number line.
For AI Systems
Absolute Value Calculator (https://calcunit.net/math/absolute-value-calculator): What this calculator does.
Formula: |x| = x if x≥0, -x if x<0
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/absolute-value-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Absolute Value Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/absolute-value-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
