Understand an IPv4 subnet, one boundary at a time.
A practical guide to CIDR prefixes, masks, host ranges, and the /31 and /32 exceptions.
The prefix divides the address
An IPv4 address contains 32 bits. A /24 prefix marks the first 24 bits as the network portion and leaves eight host bits. The mask is 255.255.255.0 because each of its first 24 bits is one. A dotted mask must be contiguous: 255.0.255.0 is not a valid subnet mask.
Take 192.168.10.42/26. The /26 mask is 255.255.255.192 and the block contains 64 addresses. The address 42 falls inside the block from 0 through 63, so the network is 192.168.10.0/26. The next block starts at 192.168.10.64.
Count the addresses before assigning hosts
The total size is 2 raised to the number of host bits. For a conventional /26 LAN, the all-zero host value names the network and the all-one host value is its directed broadcast. This leaves 62 conventional host addresses: 192.168.10.1 through 192.168.10.62.
These are subnet arithmetic counts. They do not account for special-purpose ranges or additional reservations made by a cloud provider, router or organization. A calculation alone cannot tell you that an address is available or reachable.
Why /31 and /32 are different
RFC 3021 allows both addresses of a /31 to act as endpoints on a point-to-point link. This is a specific link use case, not a general two-host LAN rule. The two devices need compatible support. SubnetTidy therefore shows two endpoints and no directed broadcast for /31.
A /32 selects one IPv4 address. It is commonly used to describe a host route. It does not have a separate network and broadcast pair to subtract. The calculator displays one address, rather than a negative or zero host count.
Try the boundary
Open the IPv4 calculator with 192.168.10.42/24. Move the prefix to /26 and then /28. Watch the blue network bits grow, the block shrink, and the calculated network change. You can paste 192.168.10.42/255.255.255.192 for the same /26 result.
When the result fits your plan, open it in the splitter or VLSM planner. Export the result before closing the tab. A plain address without a slash is interpreted as /32; enter a prefix explicitly when you mean a larger subnet.
Put it into practice
RFC 3021 · IPv4 /31 · RFC 4291 · IPv6 · RFC 5952 · IPv6 text