How to calculate IP addresses in a subnet using Windows Calculator

Reading Time: 3 minutes

In this blog post I will take you through working out how many IPv4 IP addresses there are in a subnet using the built in Windows calculator.

Let’s take an example of a /24 mask, and I want to know how many IP addresses I can use,

192.168.1.0/24 and a mask of 255.255.255.0

If you haven not already read my post on CIDR notation simplified, I would recommend you have a read.

11111111111111111111111100000000
2552552550

Add up the 1’s, that’s a total of 24 bits, that’s where the /24 comes from. See my post CIDR notation simplified if you wish to dive deeper.

How do I calculate how many available IP addresses I can assign from the above. We’ll use the Windows calculator,

Click on your start menu and search for calculator,

Switch from standard to scientific

Image showing standard calculator in Windows Operating System
Image showing the option to switch to Scientific mode

In the example above we had a subnet mask of /24. The sum to calculate the number of IP addresses available would be,

A total of 32 if we total all the bits together, we minus the bits which are turned on, 24, so that’s 32 – 24 leaving us with 8 bits (The last box to the right below).

11111111111111111111111100000000
2552552550

The sum is below, but let’s input this into the calculator.

2^{(32 - 24)}=2^{8}=256

  1. 32 minus 24 = 8
  2. we now calculate 2 to the power of 8
  3. To do this, clear the calculator and type 2
  4. Next, click the Xy button as shown in the screenshot below

5. Type 8 and click the = button

That gives us 256 IP addresses in a /24 subnet mask. We take away two as we don’t use .0 (Network address) and 255 (Broadcast address) = 254 IP’s that we can use

Try the sum with another example,

What do you get if you calculate /16, /27 and /32 using the method above. What numbers appear on your calculator.

Let me know in the comments section below

/16 = ? post the answer below

/27 = ? post the answer below

/23 = ? post the answer below

That’s it. I hope you found this post useful.

7 thoughts on “How to calculate IP addresses in a subnet using Windows Calculator

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.