CIDR / Subnet Calculator
Work out netmask, host range and host count for an IPv4 or IPv6 network.
This tool needs JavaScript enabled to run in your browser.
What this tool does
Enter a network in CIDR notation and this tool works out the netmask, wildcard mask, network and broadcast addresses, the usable host range, and the host count. It understands both IPv4 (for example 192.168.1.0/24) and IPv6 (for example 2001:db8::/64). The maths runs entirely in your browser.
Why testers reach for it
Setting up test environments, firewall rules, or container networks often means carving an address space into subnets and checking which hosts fall inside a range. A quick, private calculator saves you from doing binary masking by hand and from pasting internal network plans into a web service.
Notes on edge cases
- A
/31is treated as a point-to-point link, so both addresses count as usable. - A
/32(IPv4) or/128(IPv6) is a single host. - IPv6 blocks can hold astronomically many addresses, so the total is shown as an exact number rather than rounded.
Common use cases
- Finding the first and last usable host in a subnet.
- Converting a prefix length to a dotted netmask and back.
- Checking how many hosts a block gives you before you allocate it.
Frequently asked questions
- Does it support IPv6?
- Yes. Enter an IPv6 CIDR such as 2001:db8::/64 and it shows the network, address range and exact total count.
- Is my network data sent anywhere?
- No. All the maths runs in your browser, so internal network plans never leave the page.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.