Solved: How to calculate number of available IPs in a Subnet

Many people are confused about how many usable IPs you can get in a subnet and how to calculate it.

So here I am giving you a simple way to calculate it.

Here is the formula.

Maximum Number of IPs = 2**(32 - netmask_length)

Let’s say you have subnet mask  /28 then the maximum number of IPs you can have is

Maximum Number of IPs= 2**(32-28) = 2**(4) = 2*2*2*2 = 16

So you can have max 16 IPs in a  /28 subnet.

First and last IP of subnet is reserved for Network Address and Broadcast Address. So you are left with only 14 IPs in normal networks.

But, generally cloud providers like AWS, Azure etc. reserve 5 IPs instead of 2 IPs in each subnet . Thus, the the usable IPs available for you in AWS or Azure for /28 subnet will be 11.

Similarly, you can calculate the usable IPs in each subnet when working on cloud .

Be Sociable. Share It. Happy Learning!

3 Replies to “Solved: How to calculate number of available IPs in a Subnet”

1. Laticia says:

Thank you so much for the great article, it was fluent and to the point. Cheers.

2. Epoxy says:

Thank you so much for the great article, it was fluent and to the point. Cheers.

3. Waldo Uhyrek says:

Thank you so much for the great article, it was fluent and to the point. Cheers.