About Subnet Calculator
Usable hosts always come to two below the total: the first address names the network and the last is the broadcast address, and neither can be assigned. That arithmetic is why a /30 yields only two usable addresses.
Convert a CIDR prefix like /24 into its subnet mask and wildcard mask, with the full network, broadcast and usable host range. It is computed locally in your browser.
A subnet calculator turns an IPv4 address and its CIDR prefix (or netmask) into everything you need to plan or troubleshoot a network: the network and broadcast addresses, the first and last usable host, the total and usable host counts, the wildcard mask and the address class. Enter something like 192.168.1.10/24 — or a netmask such as 255.255.255.0 — and every value updates instantly.
It also splits a block into equal subnets, which is the core of VLSM (variable-length subnet masking) design. Slide to a longer prefix to see how a /24 divides into /26s or /30s, complete with each child network's usable range and broadcast address.
Prefix length is the whole game, and the pattern is worth internalising: every bit added to the prefix halves the range. A /24 holds 254 usable addresses, a /25 holds 126, a /26 holds 62, and a /30 holds exactly two — which is why point-to-point links between routers are conventionally allocated a /30. Reading a prefix as 'how many halvings from a full octet' is faster than counting addresses.
Which range you allocate from is a decision worth making deliberately, because it is expensive to revisit. Three ranges are reserved for internal use — 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 — and home routers overwhelmingly default into the same corner of the last one. The consequence shows up the day two networks have to talk: a VPN between two sites that both chose 192.168.1.0/24 cannot route, because each end believes that range is local. Picking something unfashionable from 10.0.0.0/8 costs nothing now and avoids a renumber later.
Common use cases
- Translating a prefix into the mask a device's config expects
- Producing a wildcard mask for an access control list
- Confirming a mask is valid before applying it to an interface