What it does
A subnet calculator turns a CIDR block such as 192.168.1.0/24 into the addresses and masks that define the subnet: network address, broadcast address, subnet mask, usable range and host count. It also works with IPv6 prefixes.
How it works
Enter an IPv4 or IPv6 address with a prefix, for example 192.168.1.0/24 or 2001:db8::/32. The address is masked to find the network boundary.
The calculator reports the network address, the last address (broadcast for IPv4), the subnet mask and wildcard mask, and the first and last usable host addresses.
For IPv4, the host count is 2^(32-prefix). Two addresses are reserved for the network and broadcast, except /31 point-to-point links and /32 host routes.
Everything is calculated locally with integer and BigInt arithmetic, and the result can be shared from the URL.
When to use it
- Plan a LAN, VLAN or cloud VPC subnet without a spreadsheet.
- Check whether two addresses belong to the same subnet before debugging routing.
- Convert a host range into a CIDR block for a firewall or access-control list.
Glossary
- CIDR
- Classless Inter-Domain Routing: an address plus a prefix length, such as /24.
- Network address
- The first address in a subnet, with all host bits set to zero.
- Broadcast address
- The last address in an IPv4 subnet, used to reach every host in that subnet.
- Subnet mask
- A mask with network bits set to one and host bits set to zero.
- Wildcard mask
- The inverse of a subnet mask, commonly used in ACLs and routing configuration.
Frequently asked questions
Why does a /31 show two usable addresses?+
/31 is a special point-to-point prefix (RFC 3021). There is no separate network or broadcast address, so both addresses can be assigned to interfaces.
How many hosts does a /24 have?+
A /24 contains 256 addresses. The network and broadcast addresses are reserved, leaving 254 usable host addresses in the usual case.
Does this support IPv6?+
Yes. IPv6 prefixes are calculated with 128-bit BigInt math. Every address in the block is an interface address, so the usable count equals the total count.
What is a private IP range?+
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for internal networks and are not routed on the public internet.
Is my input sent to a server?+
No. The calculation runs entirely in your browser and the result is stored in the share URL on your device.
API & MCP
The same result envelope is available over REST and MCP. Replace the sample value with your own target.
curl "https://100www.dev/api/v1/tools/subnet-calculator?cidr=192.168.1.0%2F24"Shareable result
https://100www.dev/tools/subnet-calculator?cidr=192.168.1.0%2F24

100www engineering
EditorialReviewed by Steve · · Report an error
Tested from the 100www probe network; results vary by location and network.


