Subnet / CIDR Calculator

Network, broadcast, host range, masks, and class from any IPv4 address and prefix — plus a binary view and subnet splitter.

/CIDR
Network
Broadcast
First host
Last host
Hosts
Subnet mask
Wildcard
Class
Scope

Network/host split (green = network bits, cyan = host bits):

What CIDR notation means

An address like 192.168.1.10/24 pairs a 32-bit IPv4 address with a prefix length — the number of leading bits that identify the network. The remaining bits identify hosts within it. A /24 fixes the first 24 bits (three octets) as the network, leaving 8 bits — 256 addresses, 254 of them usable — for hosts.

The five numbers that fall out of it

  • Network address — host bits all zero; names the subnet itself.
  • Broadcast address — host bits all one; reaches every host at once.
  • First / last host — the usable range between them.
  • Subnet mask — the prefix written as dotted decimal (/24 = 255.255.255.0).
  • Wildcard mask — the mask inverted, used by ACLs and OSPF.

The two addresses you lose (network and broadcast) are why a /24 gives 254 usable hosts, not 256.

Prefix cheat sheet

PrefixMaskAddressesUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422 (point-to-point)

Private address ranges (RFC 1918)

These never appear on the public internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. The calculator flags which one an address belongs to, plus loopback (127/8) and link-local (169.254/16).

Frequently asked questions

Why does /30 give only 2 usable hosts?
Four addresses, minus the network and broadcast, leaves two — exactly enough for a point-to-point link between two routers, which is its main use.
What's special about /31?
RFC 3021 allows /31 on point-to-point links with no network or broadcast address, so both addresses are usable — a way to save address space on router-to-router links.
Can I type the mask instead of the prefix?
Yes — put a dotted mask like 255.255.255.192 in the prefix field, or append /26 right onto the address. Either works.
What about IPv6?
This calculator is IPv4. IPv6 uses the same prefix idea but 128-bit addresses and hexadecimal notation — a separate tool.