IP Subnet Calculator
Calculate network address, broadcast address, subnet mask, and usable host range from CIDR notation.
How this tool works
Enter an IP with CIDR notation
Something like 192.168.1.0/24.
Both parts are validated
The IP address and the CIDR prefix (0-32) are checked separately, with a specific error for each.
The subnet is calculated
Network address, broadcast address, and subnet mask are derived using bitwise math.
Read the usable range
The first and last usable host addresses, plus the total count, are shown together.
Quick facts
- Category
- Calculators
- Best for
- Planning subnet ranges before configuring a network
About this tool
Enter an IPv4 address with CIDR notation, like 192.168.1.0/24, to see the full subnet breakdown: the network address, broadcast address, subnet mask (in both dotted-decimal and prefix-length form), the range of usable host addresses, and the total number of hosts the subnet can address. The math works by converting the IP address into a single 32-bit integer, generating the subnet mask from the prefix length, and using bitwise AND/OR operations to derive the network and broadcast addresses - the same binary arithmetic a router or subnet calculator performs internally. The two smallest subnets, /31 and /32, are handled as their special cases (point-to-point links and single hosts) rather than incorrectly subtracting a network and broadcast address that don’t meaningfully exist at that size. Both the IP address and the CIDR prefix (0-32) are validated, with a specific error message for whichever part is malformed. Runs entirely client-side.
Why use this tool
Full subnet breakdown
Network address, broadcast address, mask, and usable range all shown together, not one at a time.
Correct /31 and /32 handling
Point-to-point and single-host subnets are handled per RFC 3021 instead of producing a wrong host count.
Separate validation for IP and prefix
A malformed IP address and an out-of-range prefix each get their own specific error message.
Real bitwise calculation
Uses the same binary math a router performs internally, not an approximation.
Frequently asked questions
A normal subnet reserves its first address as the network address and its last as the broadcast address, leaving the rest usable - but a /31 subnet only has 2 addresses total, and a /32 has exactly 1, leaving no room to reserve either one separately. RFC 3021 specifically defines /31 subnets as usable entirely for point-to-point links (both addresses are usable hosts), and a /32 represents a single host route, so this calculator treats both as special cases rather than subtracting addresses that don’t functionally exist at that size.
The number after the slash (like the /24 in 192.168.1.0/24) specifies how many of the address’s 32 bits are fixed as the "network" portion, with the remaining bits available for host addresses within that network. A /24 fixes the first 24 bits (the first three octets), leaving 8 bits - 256 possible addresses - for hosts, while a /16 fixes only 16 bits and leaves a much larger address space of 65,536 addresses.
Explore more free tools
Formatters, converters, validators, and generators - all free and running entirely in your browser.
Browse more tools