# How to calculate IP addresses in a subnet using Windows Calculator

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.

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,

Switch from standard to scientific

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).

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

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.

## 3 thoughts on “How to calculate IP addresses in a subnet using Windows Calculator”

1. Graeme Muir

/16 = 65,536 (65,534 usable)
/27 = 32 (30 usable)
/23 = 512 (510 usable)

2. Joe

3. 