Skip to content

Free tool

CIDR Subnet Calculator

Enter an IPv4 block in CIDR notation and get its network, broadcast, masks and host range instantly. Then split it into equal subnets for your VPC or VLAN plan.

Runs entirely in your browser. Nothing you enter is sent to a server.

Binary view

Network bits are highlighted; the rest are host bits.

Split into subnets

#NetworkFirst hostLast hostBroadcast

How it works

An IPv4 address is a 32-bit number. A CIDR block such as 10.0.0.0/24 pairs an address with a prefix length: the first N bits are the network part and the remaining bits number the hosts. The subnet mask is simply N ones followed by zeros, and the wildcard mask is its inverse.

The network address is the address ANDed with the mask, and the broadcast address is the network address with every host bit set to 1. Usable hosts lie between them, so a block has 2(32 − prefix) addresses and, for prefixes up to /30, two fewer usable hosts. Splitting a block into subnets adds bits to the prefix: two subnets need one extra bit, four need two, and so on. A count that is not a power of two is rounded up, because CIDR subnets are always powers of two.

Common uses

  • Planning address ranges for a VPC, VNet or on-premises VLANs without overlaps.
  • Checking which hosts a firewall rule or security group CIDR actually covers.
  • Converting between prefix lengths, dotted masks and wildcard masks when configuring routers.
  • Carving a /16 into per-environment or per-availability-zone subnets.

Frequently asked questions

What does /24 mean in CIDR notation?

The number after the slash is the prefix length: how many of the 32 bits in an IPv4 address identify the network. A /24 fixes the first 24 bits (the mask 255.255.255.0) and leaves 8 bits for hosts, which is 256 addresses in total.

Why are two addresses subtracted from the host count?

In a normal subnet the first address is the network address and the last is the broadcast address, so neither can be assigned to a host. That is why a /24 has 254 usable hosts. A /31 (point-to-point links, RFC 3021) uses both addresses and a /32 is a single host, and the calculator handles both cases.

Do cloud providers reserve extra addresses in each subnet?

Yes, many do. AWS, Azure and Google Cloud each reserve a few addresses per subnet for their own use, so the usable count in a VPC or VNet subnet is lower than the plain maths shown here. Check your provider’s documentation for the exact number.

What is the wildcard mask for?

A wildcard mask is the inverse of the subnet mask. Some router and firewall rule syntaxes, such as Cisco access lists and OSPF network statements, use it instead of a subnet mask.

Does this tool support IPv6?

No. This calculator is for IPv4 only. IPv6 subnets work the same way in principle but with 128-bit addresses and different conventions.

All free tools

Need something built?

Need help with your cloud or software?

These tools are free to use. If you need cloud and DevOps, web or mobile development, CRM integrations or managed IT support, tell us what you are working on.