Counting Numbers in a Range

Asked how many numbers run from 7 to 15, most people subtract and answer 8. The true answer is 9, because subtraction counts the gaps between numbers rather than the numbers themselves.

--
Counting Numbers in a Range — Moosa Academy

Asked how many numbers run from  7 to  15 , most people subtract and answer  8 . The true answer is  9 . Subtraction counts the gaps between numbers, not the numbers themselves — and that single mismatch is behind a whole family of test questions.

Theorem The two rules

From  a to  b , including both ends:  b - a + 1 . Strictly between  a and  b , excluding both:  b - a - 1 .

The wording decides which rule applies. "From … to …" and "inclusive" keep the endpoints; "between" throws both away. The two answers always differ by exactly  2 .

Concept Why you add one
Count the numbers from  3 to  7 . Subtracting gives  7 - 3 = 4 , but listing them gives  3, 4, 5, 6, 7 — five numbers.

The subtraction measured the four gaps. The first number sits before any gap begins, so it never got counted. Add  1 to include it.

This is the fence-post idea: a fence with five posts has only four spaces between them. Posts always outnumber gaps by one.

Example Including the endpoints

How many whole numbers are there from  7 to  15 , including both?

Apply the inclusive rule:  15 - 7 + 1
Subtract first:  15 - 7 = 8
Add the endpoint back:  8 + 1 = 9
 9 numbers

Check by listing:  7, 8, 9, 10, 11, 12, 13, 14, 15 . Nine of them, as the rule promised.

Example Excluding the endpoints

How many whole numbers lie strictly between  7 and  15 ?

Apply the exclusive rule:  15 - 7 - 1
Subtract first:  15 - 7 = 8
Remove one more:  8 - 1 = 7
 7 numbers

A quick cross-check: the inclusive count was  9 , and dropping the two endpoints leaves  9 - 2 = 7 . The two rules agree, as they must.

Note Read the wording first
Wording Endpoints Formula
"from  a to  b " Included  b - a + 1
"inclusive" Included  b - a + 1
"between  a and  b " Excluded  b - a - 1
Summary
  1. Subtraction alone counts gaps, not numbers.
  2. Including both endpoints, the count is  b - a + 1 .
  3. Excluding both endpoints, the count is  b - a - 1 .
  4. The two answers always differ by  2 — one endpoint at each end.
  5. "From … to" and "inclusive" keep the endpoints; "between" drops them.
  6. Fence posts always outnumber the gaps between them by one.