It’s a simple but useful skill to be able to find the number some numbers between two numbers in a number set. This could take all shapes or forms. For example, sometimes, you might need to know the number of numbers from say a to b, including a and b. I’ll talk about two of such situations here. Remember that any other type of situation that comes your way, you can use simple logic and test some simple cases and generalize your findings to more complicated cases to find the rule you’re looking for.

### Calculating the Number of Numbers from a to b, Including a and b

Now, let’s say, you want to find the number of numbers from a to b, including a and b. In that case, you could think of a simple case like all the numbers from 1 to 10. Those numbers would be, 1, 2, 3, 4 5, 6, 7, 8, 9, 10. If you count them, you’ll find out that the number of those numbers is 10. So now that you know how many numbers are actually there, you could find some algebraic relationship an test it against the actual number of numbers that you have. If I subtract the first number, 1, from the last number, 10, I’d have 10 – 1 = 9 but I have 10 numbers there, not 9. So I add 1 to 9 to get to 10. Test this for any other case starting from any number and ending anywhere and it will work.

So (i) if you are working with a set of numbers like natural numbers where it’s possible to know what numbers are there and how many numbers there are between any two given numbers, and if, (ii) the numbers under study are happening based on a specific rule, then you can use the above solution to figure out the number of those numbers under study.

What (i) means is that, for example in the set of natural numbers, you know that numbers start from 1 and go all the way up to infinity. At every step, 1 is added to every number to get the next number. So the set looks something like, 1, 2, 3, … Moreover, you know that there is no number between 1 and 2 for example in this set of numbers. If you talk about the set of rational numbers, then there’s no way to know how many numbers there are between 1 and 2. The number would actually be infinite. So there, the whole solution would be useless.

What (ii) means is, that for example the numbers under study start from 1 and go all the way up to 101 or the numbers start at 1 and go all the way up to 100 missing every other number, 1, 3, 5, 7, … , 101. Here the progression of numbers is happening based on some uniform rule and so it’s possible to figure out the exact number of numbers.

Getting back to our original problem, figuring out the number of numbers from a to b, numbers happening based on a rule similar to 1, 2, 3, … , b, you could write the number of those numbers as (b – a + 1)

### Calculating the Number of Numbers Between a and b, Excluding a and b

This would be the exact same situation, except that you’d need to make some changes to the formula you got in the previous step. Since in this case, you have to subtract two numbers from that sum (you have to exclude a and b from the sum), you’d end up with (b – a + 1) -2 which is equal to (b – a – 1).