Skip to content
Accessibility
Theme
Text size
High contrast
Limit animations
Readable fontAtkinson Hyperlegible
Increased text spacing
Underline links
Always show focus

Runs in your browser — nothing you paste is uploaded.

CIDR / Subnet Calculator

Enter an IPv4 address with a CIDR prefix and get the network, broadcast, usable host range, netmask, wildcard and host count. Runs in your browser.

Format: a.b.c.d/prefix (prefix 0–32).


    

What it does

Parses an IPv4 address in CIDR notation — a.b.c.d/prefix — and derives the whole subnet: the network address, the broadcast address, the first and last usable host, the subnet mask, the wildcard mask (the mask's bitwise inverse, used in Cisco ACLs and OSPF) and the count of usable hosts. The prefix is the number of leading 1 bits in the mask, so /24 fixes the first 24 bits as the network and leaves 8 bits for hosts.

How it works

The address and mask are treated as 32-bit integers. The network address is ip AND mask; the broadcast is the network with every host bit set to 1. The usable host range is everything between those two, which is why a block of n addresses normally offers n − 2 usable hosts: one address is reserved for the network identifier and one for broadcast.

Worked examples

  • 192.168.1.0/24 → network 192.168.1.0, broadcast 192.168.1.255, mask 255.255.255.0, hosts 192.168.1.1–192.168.1.254 (254 usable).
  • 10.0.0.5/30 → network 10.0.0.4, broadcast 10.0.0.7, just 2 usable hosts (.5 and .6) — the classic sizing for a router-to-router link.

Gotchas

  • Any host address works as input: 192.168.1.73/24 is normalised to the 192.168.1.0/24 network — the tool does not require you to type the network address.
  • /31 is special (RFC 3021): point-to-point links use both addresses, so it reports 2 usable hosts, and /32 describes a single host.
  • This is IPv4 only (prefix 0–32); IPv6 uses a different 128-bit model.

When to use it

Sizing a subnet, writing firewall or ACL mask rules, filling in a VPC/VLAN plan, or checking whether an IP falls inside a given range. To convert a mask or octet to binary, use the Number Base converter.

Privacy

Everything is computed locally in your browser; no address or range is uploaded.

Frequently asked questions

Why does /24 give 254 usable hosts and not 256?

A /24 contains 256 addresses, but the first (the network address) and the last (the broadcast address) are reserved, leaving 254 that can be assigned to hosts.

Can I enter any host address, or must it be the network address?

Any address in the block works. 192.168.1.73/24 and 192.168.1.0/24 both resolve to the same network, because the tool applies the mask to find the network address for you.

Does it support IPv6?

No. This calculator is IPv4 only and accepts prefixes from 0 to 32. IPv6 uses 128-bit addresses and a different notation.

Related tools