Subnet & IP calculation
CIDR notation, subnet masks, and IPv4/IPv6 addressing explained
CIDR notation (like 192.168.1.0/24) states an IP address alongside a prefix length — the number of leading bits that identify the network, with the remaining bits identifying hosts within it. A /24 reserves 8 bits for hosts, giving 256 total addresses, of which 254 are usable in a conventional IPv4 subnet (the first address identifies the network itself, the last is the broadcast address). The subnet mask (255.255.255.0 for a /24) is just another way of writing the same prefix length as a 32-bit pattern of 1s and 0s.
VLSM — variable-length subnet masking — is what lets you split one address block into subnets of different sizes instead of forcing every subnet to be equal. A network with one segment needing 100 hosts and another needing 6 wastes a lot of address space if both get identical fixed-size blocks; VLSM lets you allocate a /25 to the first and a /29 to the second, matching actual need. This is standard practice in real network design, and it's also the calculation most people find hardest to do reliably by hand, since it means working out host counts backwards from a target prefix length repeatedly.
IPv6 changes some of the arithmetic: addresses are 128 bits instead of 32, prefix notation works the same way (a /64 is the typical subnet size for a LAN segment), but there's no broadcast address concept — IPv6 uses multicast for the equivalent functionality. The address space is large enough that IPv6 subnetting is rarely about scarcity the way IPv4 is; it's more about organizing hierarchy cleanly. Subnetic, SubnetMaskCalculator, and NetLoom each cover this ground for iOS/macOS, from single-address lookups to VLSM planning to batch CIDR aggregation across pasted address lists.
The app
Subnetic
Subnetic is the fast, private subnet calculator for network engineers, admins, and students. Type any IPv4 address or CIDR and instantly ge…
SubnetMaskCalculator
OctetLab is a subnet calculator built for network engineers, sysadmins, and students who need answers in seconds, not spreadsheets. Enter an…
NetLoom
NetLoom is a fast, fully offline calculator for network administrators, developers, and students working with IPv4 and IPv6 addresses. Type …
How it compares to other tools
Frequently asked questions
What does /24 mean in an IP address like 192.168.1.0/24?
It's CIDR notation for a 24-bit network prefix, leaving 8 bits for host addresses — 256 total addresses in the block. In a conventional IPv4 subnet, 2 of those (the network address and the broadcast address) aren't assignable to hosts, leaving 254 usable addresses.
How do I calculate the number of usable hosts in a subnet?
For IPv4, it's 2^(32 − prefix length) − 2, subtracting the network and broadcast addresses. A /24 gives 2^8 − 2 = 254 usable hosts; a /28 gives 2^4 − 2 = 14. The exception is /31 subnets (RFC 3021), used for point-to-point links, where both addresses are usable and there's no broadcast address at all.
What is VLSM and why does it matter?
Variable-length subnet masking lets you divide an address block into subnets of different sizes instead of one fixed size for all of them, so a segment needing 200 hosts and one needing 5 don't both get identical, wasteful allocations. It's the standard technique for efficient real-world network address planning.
Does IPv6 use broadcast addresses the way IPv4 does?
No. IPv6 has no broadcast address; it uses multicast addressing to reach groups of interfaces instead. IPv6 addresses are also 128 bits versus IPv4's 32, making the address space vastly larger — subnetting in IPv6 is generally about organizing hierarchy rather than conserving scarce addresses.