askvity

How do you find the number of integers between two given integers?

Published in Mathematics 1 min read

To find the number of integers between two given integers, subtract the smaller integer from the larger integer and then subtract 1.

Let's break this down:

  • Find the Difference: Subtract the smaller integer from the larger one. This gives you the total number of integers including both the starting and ending integers.

  • Subtract 1: Because we want the integers between the two given integers (and not including them), we subtract 1 from the difference.

Example:

Let's say you want to find the number of integers between 3 and 7.

  1. Find the Difference: 7 - 3 = 4
  2. Subtract 1: 4 - 1 = 3

Therefore, there are 3 integers between 3 and 7 (which are 4, 5, and 6).

Formula:

If a and b are integers, where b > a, then the number of integers between a and b is:

( b - a ) - 1

Why does this work?

The initial subtraction (b - a) gives you the total number of integers from a to b, inclusive. Since we only want the numbers between a and b, we exclude both a and b by subtracting 1.

Related Articles