Subnet Calculator
Calculate network, broadcast, and host ranges from CIDR
IPv4 only. A /31 is a point-to-point link so both addresses are usable (RFC 3021), and a /32 is a single address. Everything else excludes the network and broadcast addresses. All of this is computed in your browser.
Do this with a friend
Watch the same screen together, live
Usable addresses
254
192.168.0.1 ~ 192.168.0.254
About this tool
Enter an IPv4 address and CIDR to calculate the network address, broadcast address, subnet mask, wildcard mask, and the range and count of usable hosts. Leaving the default 192.168.0.0/24 as is gives you network address 192.168.0.0, broadcast 192.168.0.255, subnet mask 255.255.255.0, and a usable host range of 192.168.0.1 to 192.168.0.254 โ 254 addresses in total (256 minus the network and broadcast addresses). It also flags whether the range is a private block (RFC1918) or a special-purpose block like loopback, link-local, multicast, or CGNAT, and lets you view a list split into smaller subnets. Keep in mind this is purely an arithmetic result โ if your actual network hardware's routing or firewall configuration differs from the CIDR you enter, real-world behavior can differ from what is shown here, and IPv6 addresses are not supported.
How to use
- Enter it in `192.168.0.0/24` format, or write the mask out (`192.168.0.0 255.255.255.0`); leaving off the prefix treats it as a single address (/32).
- Check the network address, broadcast address, subnet mask, and wildcard mask.
- Check the usable host range and count, whether it is private or public, and any special-purpose block.
- To split it further, pick a target prefix and view the list of resulting subnets.
- If the split produces more than 64 subnets, only the first 64 are shown, with a note that the list was truncated.
- Tap any value to copy it to the clipboard.
Frequently asked questions
- Why are there 2 fewer usable addresses than the total?
- The network address (the first address in the range) and the broadcast address (the last one) cannot be assigned to a device, so only total minus 2 addresses are actually usable.
- Why are /31 and /32 different?
- /31 is dedicated to point-to-point links and uses both addresses as hosts (RFC 3021). /32 is a host route with exactly one address.
- What is the wildcard mask used for?
- It is used in place of a subnet mask in things like router ACLs (access control lists). Its bits are the exact inverse of the subnet mask's (1s and 0s swapped).
- Does this support IPv6?
- Only IPv4 is supported right now.
- How are private and special-purpose blocks distinguished?
- 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are RFC1918 private blocks. Special-purpose blocks such as 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local), 224.0.0.0/4 (multicast), and 100.64.0.0/10 (CGNAT) are also flagged.
- Can I enter formats other than CIDR notation?
- Yes. You can write the prefix after a slash, as in `192.168.0.0/24`, or spell out the mask, as in `192.168.0.0 255.255.255.0`. Leaving off the prefix or mask entirely treats it as a single address, /32.
- Why does a mask like 255.0.255.0 fail to calculate?
- A subnet mask must be a contiguous run of 1 bits followed by 0 bits. If the 1s and 0s are mixed, it is not a valid subnet mask, and you just get an 'invalid' message.
- The split list stops at 64 โ is that all there is?
- 64 is only a display cap because drawing more would be impractical; the actual number of subnets can be far larger. When the split exceeds 64, a note tells you the list was truncated.
- Can I copy a calculated value directly?
- Yes. Tap a value like the network address, broadcast, or mask to copy it to your clipboard instantly, confirmed by a brief checkmark.
This calculator only shows IPv4 CIDR calculation results. It is separate from your actual network hardware's routing or firewall configuration, and IPv6 is not supported.