# Calculate IPv4 and IPv6 subnets

> Type an address with a prefix or a netmask: the ranges and the split appear straight away.

Turn a CIDR address or netmask into the network, broadcast, host range, wildcard and binary view. Split IPv4 into subnets, plan VLSM, explore IPv6 prefixes.

- Tool: [Subnet calculator](https://fixmint.cc/subnet-calculator)
- Category: [Industrial & networks](https://fixmint.cc/industrial)
- Fixes: Where does this subnet start and end?
- Runs in the browser: files and text stay on the device, no sign-up, free.

## How to calculate a subnet

1. Type an IPv4 address with a prefix or dotted netmask, or an IPv6 address with a prefix.
2. Read the network, broadcast, host range and binary view, including the address class and special-use flags.
3. Set a subnet count or a host count to see the split, with the prefix each part needs.

## Questions

### How are network and broadcast found?

The prefix length says how many leading bits are the network. The network address keeps those bits and sets the rest to zero; the broadcast sets every host bit to one. In IPv4, the first and last addresses of a subnet are conventionally reserved, so a /26 has 64 addresses and 62 usable hosts. A /31 and a /32 have no usable host range in that convention.

### What does the split table do?

For an equal split, the calculator borrows enough host bits to make at least the requested number of subnets; for a host count it keeps enough host bits for that many hosts plus the network and broadcast addresses. The mask, block size and count shown are the result of that bit arithmetic, not a lookup table.

### What do class, private and reserved mean?

Class is the historic A/B/C/D/E split by the first address bits; modern networks use CIDR, but the label is still useful when reading old documentation. Private means RFC 1918 space (10/8, 172.16/12, 192.168/16). The reserved flags mark loopback, link-local, multicast and a few other special ranges from the IANA IPv4 special-purpose registry.

### How does the IPv6 half work?

An IPv6 prefix is shown compressed and expanded, with the first and last address in the range and the number of /64 sub-prefixes it contains. IPv6 has no broadcast; the whole prefix is routable space except for special ranges such as the 2001:db8::/32 documentation prefix, which is flagged.

## Related tools

- [Wi-Fi range estimator](https://fixmint.cc/wifi-range-estimator): How far does my Wi-Fi reach?
- [Unit converter](https://fixmint.cc/unit-converter): What is that in metric?
- [Browser info](https://fixmint.cc/browser-info): Which browser version is this?
