To find the distance between two points on a number line, subtract the coordinates in either order and take the absolute value: distance = |a − b|. For −4 and 7, that's |−4 − 7| = |−11| = 11. The absolute value is the whole method — it forces the answer positive, which distance always is. Everything below is that formula applied to negatives, decimals, fractions, and the mistakes that cost people points on tests.

Why the Absolute Value Makes the Formula Work Every Time

Distance on a number line is a length, and length cannot be negative. At first it's easier to just count every unit between the points, which works fine for small whole numbers like 2 and 8. But once the numbers get big, or negative, or fractional, counting breaks down and you need a procedure. The absolute value creates that procedure.

Kids frequently ask whether the order of subtraction matters. With absolute value, it doesn't: |3 − 10| = |−7| | = 7, and |10 − 3| = |7| = 7. The subtraction is measuring a gap; the absolute value throws away whatever sign the gap had, keeping only the size. |10 − 3| might be 10 − 3 = 7, but if you went the other way, |3 − 10| = −7, and the absolute value makes it 7.

This same idea appears in higher math as the distance formula for higher dimensions, but on a one-dimensional number line it simplifies to one expression. The standard definition is d = |a − b|, and it gets taught from sixth-grade number systems onward. Writing it as |a − b| puts the operation first and the direction last, which is the safer order for building the habit.

Expression Evaluation Result
|5 − 2| |3| 3
|2 − 5| |−3| 3
|−4 − 7| |−11| 11
|7 − (−4)| |11| 11
|−6 − (−2)| |−4| 4
|0 − 8| |−8| 8

The table holds only six test cases but shows the main failure modes. A quick shortcut for whole numbers: if the two points have the same sign, subtract the smaller absolute value from the larger and ignore the signs entirely. If they sit on opposite sides of zero, add the two absolute values. The formula covers both; the shortcut is a mental check.

Counting Units First: The Beginner Method That Builds the Right Instinct

Use counting when both numbers are small whole numbers, like −2 and 5. Put the points on a line, then count steps. Here −2 to 0 is 2, then 0 to 5 is 5, total 7. No arithmetic beyond adding two small numbers.

Counting has real range limits. On a standard ruler, tick marks are typically spaced every 1/16 inch (about 1.6 mm), and a typical 12-inch ruler comfortably handles distances up to just under 12 inches in one pass — about 2.5 cm to 30 cm. Beyond that, people lay rulers end to end, introducing alignment errors at each join. For a scale drawing, a distance that spans four joined ruler lengths can easily be off by a quarter inch before any measurement mistake enters the picture.

Counting teaches one thing the formula slightly hides: a point's distance from zero is its absolute value. The number −7 is 7 units from zero because |−7| = 7. The number 7 is also 7 units from zero. Distance never cares about side, only separation.

ALSO do the opposite exercise once. Count a distance you know is 15 units and ask which point pairs make 15: −5 and 10, −12 and 3, 0 and 15. The pair (−5, 10) forces the sign switch, and it's the one habit that makes the arithmetic method stick.

The Three-Step Arithmetic Method for Large and Negative Coordinates

When counting is impractical, the formula takes over, and it always runs in the same order.

1: Identify a and b. Write both coordinates exactly as given, keeping signs: a = −18, b = 43. 2: Subtract one from the other. Either order works: −18 − 43 = −61, or 43 − (−18) = 61. Keep the sign at this stage. 3: Take the absolute value. |−61| = 61, so the distance is 61 units.

Handling the double negative is where most errors happen. Subtracting a negative is adding: 43 − (−18) becomes 43 + 18. A good rule is to rewrite every subtraction of a negative as an addition before computing. Do the rewrite, then the sum, then the absolute value.

Some people prefer a grid problem to a number-line problem because a grid problem is two number-line distances combined. On a coordinate plane, the vertical distance is |y₂ − y₁| and the horizontal is |x₂ − x₁|. You can compute the number-line distance along each axis first, then combine them with the Pythagorean theorem. The number-line formula is the building block for the 2D version.

Worked Examples: From Simple Integers to Fractions and Decimals

Work through several examples over the line.

Start with a = 4, b = 9: |4 − 9| = 5. Now opposite sides of zero: a = −3, b = 5, so |−3 − 5| = |−8| = 8. Both negative: a = −10, b = −2, so |−10 − (−2)| = |−10 + 2| = |−8| = 8. Both positive: a = 7, b = 12, so 5. Same coordinate twice: a = 6, b = 6, so |6 − 6| = 0. The last one matters: a distance of zero is allowed, and on a number line it means the points coincide.

Decimals behave the same way. A = 2.7 and b = −1.3: distance = |2.7 − (−1.3)| = |2.7 + 1.3| = 4.0. A = −0.45 and b = 0.85: |−0.45 − 0.85| = |−1.30| = 1.30. Adding the absolute values works because the points straddle zero; exact decimal arithmetic keeps the answer exact.

Fractions can trip up students: a = −3/4 and b = 1/2. Subtract: −3/4 − 1/2 = −3/4 − 2/4 = −5/4. Take the absolute value: 5/4 units, or 1.25 on the same scale. Repeat using the alternative order: 1/2 − (−3/4) = 2/4 + 3/4 = 5/4. Same answer, confirming that order never matters.

Choose your representation with precision in mind. A number line from −10 to 10 can be drawn with simple tick marks, but fractional distances like 1/6 or 1/8 need finer units. Convert fractions to decimals with a common denominator before subtracting, especially when the denominators differ. If the answer has to be exact, keep the fraction; if it's a measurement on paper where precision has real limits, decimals are fine for reading.

Reading the Number Line in a Test Setting: Gridlines, Tick Marks, and the Scale Trap

A test problem gives you a number line and asks you to read it, so the reading is half the work. If the line runs from −10 to 10 and the point sits on a tick beyond zero, the tick mark at −7 is seven lines left. But when the scale is compressed, a tick labeled 2 may not mean 2 units from the previous numbered mark.

That trap surfaces in real life at school. A printed scale for a class assignment typically spaces ticks at 1 unit, but a large-scale timeline may mark 5 or 10 units per labeled tick with minor ticks in between. Before computing, confirm the increment: divide the gap between two labeled ticks by the number of subdivisions. On a line from 0 to 50 with five subdivisions, each minor tick is 10 units. A distance read off by counting ticks then has to be multiplied by 10, and that multiplication step is where students lose points.

Rulers have the same scale question. A standard 12-inch ruler usually marks 1/16 inch, and a metric ruler marks 1 mm; the increment is printed on the tool, not universal. The point coordinates in a test are usually given explicitly, which makes the formula the safer route. Read the axis labels first, and the labeled-increment definition, then compute.

The Common Errors: Order, Sign Drop, and the Vertical Bar and Minus Confusion

Each error has a correction.

1: Assuming an order that can't yield a negative. If you compute the larger minus the smaller and don't bother with absolute value, the answer is positive anyway and the habit looks harmless. The error shows up when you compute a − b and the result is negative, and then you report a negative distance. Corrections: compute the expression inside the bars first, then evaluate |a − b|: the first step is subtraction, the second is absolute value. 2: Confusing the vertical bar with the number 1 or with a minus sign. A common failure is reading |−4| as "minus 1 times 4" or as a "1" before the digit. In handwritten work this is a real problem. Correction: keep the two vertical lines visibly shorter than the digits and a bit apart; the value is never negative. 3: Sign errors in the double negative. Subtracting a negative becomes addition. Rewrite −(−4) as +4 before computing, on paper; doing the rewrite takes seconds, and doing it twice prevents most of these errors. 4: Forgetting units. If the points are on a ruler-marked line in centimeters, the distance is in centimeters. Skip units in problems and keep them in measurements. A distance is |a−b| units, not a bare number.

The tool has one clean diagnostic. Recompute in the other order, then compare; mismatch means a sign error, and the answer that matches both orders is preferred. A second check is adding from one point: if d is the distance and a + d or a − d lands on b, the sign handling was right.

The exam habit that's effective: write the expression, write the substitution, write the absolute value, then write the answer. Avoid combining all four into one line. Each of those steps earns part credit, and the display shows your sign handling.

Why Distance Never Decreases: A Sanity Check for Story Problems

A sanity check for story problems: distance can't be negative, but a difference can. In a story, "elevation change" and "distance" often get confused. If two hikers are at −120 m and 80 m elevation relative to sea level, the elevation difference is 200 m, and the distance along a trail is also positive. If the question asks how far apart they are, the answer is 200, not −200.

The street-map situation is the practical check. House numbers on opposing sides of a street, 0 and 180, are 180 house numbers apart. Utility poles 0 and 180 are 180 pole numbers apart only if each number is one pole unit; if the poles repeat in blocks of 10 numbers with each set counting 10, the physical distance is less. The formula operates on raw coordinates; the unit of the coordinate governs the physical meaning.

What's the point? story-problem numbers are usually rounded measurements or estimated values. When both input points come from data with about ±1 unit of rounding, the computed distance has about ±2 units of uncertainty — the combined error. If the estimated distance between two plots measured to ±1.0 m and ±2.0 m is 45 m, state the distance as 45 ± 3 m, not as an exact 45. That avoids over-claiming precision.

The habit: look at the two coordinates before applying the formula. Same sign means same region, so subtract the values and the signs cancel. Opposite signs mean the zero point is between them, so add the magnitudes. The formula never changes, only the mental model does for better results.

Word Problems and Real Measurements: When the Coordinates Come From Data

The same arithmetic crosses into everyday situations.

Elevation and depth offshore. Two marine survey marks at −42 m and 8 m relative to mean sea level are 50 m apart in elevation. The number line is vertical; absolute value's idea is unchanged. Temperature swings. A bad day is at −12 °C in the morning and 9 °C in the afternoon, a 21 °C spread. Weather records use exactly this subtraction when reporting an "extreme spread" for stations. A 2015 report from the National Agricultural Statistics Service used nearly identical reasoning for heat units, and it's the definition used at co-ordinate scales. Budget line. A household's net cash flow in a good month is +1,200 and in a bad month is −650, a swing of $1,850. Finance script and accounting-ledger reports sum signed amounts; the distance between a surplus and a deficit is the total swing. Moving. On a highway map, exits numbered by mile at 18 and 63: the distance is 45 miles, because exit numbering is exactly functional: number minus number, in miles. This is why exit numbers increment from real distance.

Coordinates do sometimes carry units that convert. A tape measure with centimeters and inches both must have the same scale for a subtraction to mean anything physical. Convert first. Period.

One more precision fact: the format 0x7FFFFB and the formatting of hex coordinates uses the same absolute-difference logic but is loaded by the format. For a hex/octagonal coordinate display, length is difference over |b − a| regardless of the shift-width, the leading bits of subtraction.

Frequently Asked Questions

Can the distance between two points on a number line be negative?

No. The true sign of the distance is nonnegative by definition: |−7 − 3| = 10, and any expression that produces a negative value is wrong. A negative answer is a signal that either the absolute value was skipped or the equipment reported a signed difference. In coordinate geometry, "signed difference" is a different quantity, not distance.

Does it matter which point I subtract from which?

No. The difference is negative, but its absolute value is the same. The order flips the sign, the magnitude stays fixed; |3 − 10| = |10 − 3| = 7. Use the convention "larger coordinate minus smaller" only as a shortcut for mental math; it fails when both coordinates are negative, so always finish with absolute value.

What is the distance from −4 to 7?

It's 11 units. Work: 7 − (−4) = 7 + 4 = 11, and |11| = 11. The points are on opposite sides of zero, so their distances from zero add: 4 + 7 = 11. A sign-flip error like −4 − 7 = −11 would still give 11 after the absolute value, which is why the subtraction step is safe in either order.

How do I find the distance if the coordinates are decimals?

Subtract as decimals, keep the full value, then take the absolute value. For points −0.45 and 0.85, |−0.45 − 0.85| = |−1.30| = 1.30. Match the place values before subtracting; converting fractions to decimals is fine when the exact fraction is not required. The method is identical to whole numbers; only the alignment changes.

Is counting tick marks on a printed number line reliable?

Only when the tick increment is confirmed. A scale from 0 to 50 with five labeled subdivisions has 10 units per mark, not 1, and counting marks as single units multiplies the error fivefold. Read the labeled gap, divide by subdivisions, then multiply the tick count by that increment. For small whole numbers, counting is exact.

How is number-line distance related to the Pythagorean distance formula?

In two dimensions, the distance between points is the Pythagorean theorem applied to the horizontal and vertical separations, each computed as |x₂ − x₁| and |y₂ − y₁|. The formula is d = √((x₂ − x₁)² + (y₂ − y₁)²). The number-line value is the one-dimensional component; that's why the 1D version has no square root.

What does a distance of zero mean?

A distance of zero means the coordinates are equal: |6 − 6| = 0. Two distinct points always differ, so a positive result means the formula ran correctly; a zero on distinct inputs means you wrote the same coordinate twice or misread a minus sign. Zero is a legitimate answer for a single point.

Why do elevation and temperature gaps use the same rule?

Elevation and temperature are signed measurements along a vertical scale with a defined zero point, and the size of the difference between two values is the same absolute value. A temperature swing from −12 °C to 9 °C is 21 °C, and an elevation difference from −120 m to 80 m is 200 m. The formula treats all signed scales alike.