What this tool does
The Subnet Calculator is the comprehensive calculator in this set. The second field accepts /26, 26, or a mask such as 255.255.255.192. Both forms are first converted to the same prefix, then passed to the shared calculation engine to produce identical results.
- Every prefix from /0 to /32 is supported, not just /8, /16, and /24.
- A subnet mask must consist of consecutive 1 bits followed by consecutive 0 bits.
- /31 and /32 use explicit special-case semantics for the First, Last, and Usable values.
How to use it
- Enter an IPv4 address.
- Enter a CIDR prefix or subnet mask.
- Click Calculate Subnet.
- View the network address, broadcast address, host range, bit counts, and address count.
How it works
The mask divides the 32 bits into network bits and host bits. A bitwise AND of the IP and mask produces the network address; setting every host bit to 1 produces the broadcast address. The number of host bits alone determines the total address count.
Examples
- 192.168.10.45/26 → Mask 255.255.255.192, Network 192.168.10.0, Broadcast 192.168.10.63.
- 172.16.33.7/20 → Network 172.16.32.0, Broadcast 172.16.47.255.
- 10.10.10.10 with 255.0.0.0 → 10.0.0.0/8.
Common uses
- Plan IPv4 subnets that do not fall on octet boundaries.
- Verify that a prefix and mask are equivalent.
- Calculate the first and last host addresses and the traditional usable-host count.
Privacy
Inputs and results are processed only in local browser memory. Nothing is uploaded, sent to an online API, or stored automatically.
Subnet Calculator Features
Perform comprehensive subnet calculations using a CIDR prefix or contiguous subnet mask, including boundaries, bit counts, and the host range. Useful for network planning, configuration checks, and troubleshooting; results can be reviewed and copied immediately.
FAQ
What does /24 mean in CIDR notation?
It represents 24 network bits and 8 host bits, corresponding to 255.255.255.0.
Can I enter a subnet mask directly?
Yes. The tool first verifies that the mask bits are contiguous, then derives the prefix.
Can /31 or /32 produce a negative value?
No. A /31 shows the two RFC 3021 point-to-point addresses, and a /32 shows one host route.
Does the calculation enumerate every address in the network?
No. It calculates boundaries and counts with constant-time bitwise operations.