Skip to content
mathbehind

IP Subnet Calculator (IPv4 CIDR)

Enter an IPv4 address and CIDR prefix to get the network and broadcast addresses, usable host range, subnet mask, wildcard mask and host count.

Your numbers

Any address inside the subnet, e.g. 10.0.4.12.

bits

The number after the slash: /24 = 255.255.255.0, /26 = 255.255.255.192.

Network (CIDR)

192.168.10.64/26

Usable host range
192.168.10.65 to 192.168.10.126
Usable hosts
62
Total addresses
64
Broadcast address
192.168.10.127
Subnet mask
255.255.255.192
Wildcard mask
0.0.0.63
Mask in binary
11111111.11111111.11111111.11000000
Address type and class
Private (RFC 1918), class C

A subnet splits an IP network into smaller blocks. The CIDR prefix, the number after the slash in 192.168.10.0/26, says how many bits identify the network; the rest identify hosts. This calculator turns any address and prefix into the network address, broadcast address, usable host range and masks, for planning VPCs, firewall rules or office networks.

How it works

An IPv4 address is 32 bits. A /26 prefix means the first 26 bits are the network and the last 6 are for hosts, so the block has 2⁶ = 64 addresses. The subnet mask is those 26 ones followed by 6 zeros: 255.255.255.192.

The network address is your IP with the host bits set to zero, and the broadcast address has them all set to one. Every address in between is usable for hosts, so a normal subnet has 2^(32 − prefix) − 2 usable addresses.

Two prefixes are special. A /31 has two addresses and no broadcast; both are usable on point-to-point links (RFC 3021). A /32 is a single host, often used in routing tables and firewall rules.

The wildcard mask is the mask inverted, 0.0.0.63 for a /26. Cisco access lists and some firewalls use it instead of the subnet mask. Cloud providers such as AWS also reserve a few addresses in each subnet, so check your provider's documentation for the exact usable count.

A worked example

For 192.168.10.77/26, the mask is 255.255.255.192. The address sits in the block 192.168.10.64/26, which runs from 192.168.10.64 to the broadcast address 192.168.10.127. The 62 usable host addresses are 192.168.10.65 to 192.168.10.126. It's a private address range.

Questions people ask

How many hosts are in a /24?

256 addresses, of which 254 are usable for hosts: the first is the network address and the last is the broadcast address.

What is 255.255.255.0 in CIDR notation?

/24. Count the one bits in the mask: 255.255.255.0 is 24 ones followed by 8 zeros.

How do I choose a subnet size?

Take the number of hosts you need, add room to grow, and pick the smallest block that fits: /27 gives 30 usable addresses, /26 gives 62, /25 gives 126 and /24 gives 254. In the cloud, leave extra for the addresses the provider reserves.

Which IP ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, defined in RFC 1918. They aren't routed on the public internet, so they're used inside homes, offices and cloud VPCs.

Does this work for IPv6?

No, this calculator handles IPv4. IPv6 uses 128-bit addresses and different conventions, with /64 as the standard size for a single network segment.