fjordtools / Network / Subnet Calculator

Subnet Calculator: IPv4 and IPv6 CIDR

Calculate network, broadcast, netmask and usable hosts for any IPv4 or IPv6 CIDR block. Split, summarise and check addresses. Runs in your browser.

Address
About Subnet Calculatorhow it works and good to know

How to read a CIDR block

A block such as 192.168.1.0/24 is an address plus a prefix length. The prefix says how many bits at the start are the network and the rest are for hosts: a /24 keeps 24 network bits and leaves 8 for hosts, which is 256 addresses. You can also type a netmask, as in 10.0.0.0 255.255.0.0. The binary strip shows exactly where the network ends.

IPv4 and IPv6 in one tool

Paste either kind. IPv4 shows the network, broadcast, netmask, wildcard and the first and last usable host (a /31 is a point-to-point link with two usable addresses, and a /32 is one host). IPv6 shows the compressed and expanded forms, the first and last address, the exact number of addresses, and the reverse DNS name. Addresses such as ::ffff:192.0.2.1 are IPv4-mapped IPv6.

Splitting and summarising networks

Split cuts a block into equal smaller ones, for example a /24 into four /26, and says how many there are in total even when the list is too long to show. Contains tells you whether an address is inside the block. Summarise merges a list of blocks and addresses into the fewest blocks that cover exactly the same addresses, handy for firewall rules and route tables.

Special ranges

The scope row names well-known ranges: private networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), carrier-grade NAT (100.64.0.0/10), loopback, link-local, documentation ranges, multicast, and for IPv6 unique local addresses (fc00::/7) and link-local (fe80::/10). Zone ids such as %eth0 are not supported.

How it is tested

The results are compared with Python's ipaddress module and Node's net on thousands of random networks: parsing, network and broadcast addresses, counts, splitting, containment, summarising, compressed forms (RFC 5952) and reverse names.

Next steps

See an address or mask in other bases with the number base converter, or look up the response of a failing health check in HTTP status codes.

Privacy

Everything is calculated in your browser. The addresses you type never leave your device.

Related tools