Subnet Calculator
This subnet calculator turns an IPv4 address and a CIDR prefix into a full breakdown. Type the address, pick a prefix like /24, and you'll get the subnet mask, the network and broadcast addresses, the first and last usable host, the host count, and the wildcard mask, with a live bit map showing the network and host split. Then split the block into equal subnets, or switch to the IPv6 panel. It's free and private, you won't need an account, and it all runs on any device, so network planning takes seconds.
- Mask from CIDR
- Network and broadcast
- Host range
- Subnet split
- IPv6 panel
Last updated July 22, 2026 IPv4 and basic IPv6 Reviewed by the Calcowa team
Enter four numbers from 0 to 255 separated by dots. The prefix sets how many bits belong to the network, and the split control divides the block into equal subnets.
Subnet split
Pick a count in the "Split into" box above to carve this network into equal subnets, each with its own network, usable range, and broadcast.
| # | Subnet | Usable range | Broadcast | Hosts |
|---|
IPv6 subnet
Enter an IPv6 address and prefix for the network, the first and last address, and the total address count. IPv6 has no broadcast and no reserved hosts, so every address in the block is usable.
2^64 addresses
How does subnetting work?
An IPv4 address is 32 bits, usually written as four numbers from 0 to 255. Subnetting splits those bits into a network part and a host part, and the CIDR prefix says where the line falls: a /24 keeps the first 24 bits for the network and leaves 8 for hosts. The subnet mask is just those network bits set to 1, so /24 is 255.255.255.0. Line the address up against the mask and the network address appears, with all host bits zeroed; flip the host bits to 1 and you get the broadcast address. Everything between them is assignable, which is why a /24 holds 256 addresses but only 254 usable hosts. You don't have to work the binary by hand, and you won't miscount the hosts, since it's all derived for you. This tool runs that bit math and lays out the mask, the network, the broadcast, the host range, and the wildcard at once.
Splitting a /24 into four subnets
Say you own 192.168.1.0/24 and want four equal VLANs. To make four subnets you borrow 2 host bits, because 2 to the power of 2 is 4, so the new prefix is 24 plus 2, which is /26. Each /26 has 6 host bits left, giving 64 total addresses and 62 usable. Line them up in order and the blocks fall at 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26, and 192.168.1.192/26. The split table above does exactly this: pick a count, and it borrows the right number of bits, then lists every subnet with its network, usable range, and broadcast so you don't have to add the block size in your head.
Reading a subnet, step by step
Here's the quick routine for any address, and it's just four steps:
- 1
Enter the IPType the IPv4 address you are working with.
- 2
Pick the prefixChoose the CIDR, or tap a preset like /24.
- 3
Read the breakdownYou'll get the mask, network, broadcast, and hosts.
- 4
Split if you need toChoose how many equal subnets to carve the block into.
Common CIDR prefixes
Here's the mask and usable host count for the prefixes you'll meet most, so it's quick to scan.
| Prefix | Mask | Usable hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /30 | 255.255.255.252 | 2 |
Frequently asked questions
You type an IPv4 address and choose a CIDR prefix, like /24, and it works out the rest. It builds the subnet mask from the prefix, lines up the address against it with bitwise math, and reads off the network address, the broadcast address, the first and last usable host, the host count, and the wildcard mask. It all runs on any device, so you'll see every value update the moment you change the address or the prefix.
CIDR, short for Classless Inter-Domain Routing, writes a subnet as the address followed by a slash and a number, like 192.168.1.0/24. That number is the prefix length, the count of leading bits fixed for the network, so /24 means the first 24 bits are the network and the last 8 are for hosts. A bigger prefix means a smaller subnet with fewer hosts, which is why /30 leaves room for just a couple of devices.
Take 2 to the power of the host bits, which is 32 minus the prefix, then subtract 2 for the network and broadcast addresses that you cannot assign. A /24 has 8 host bits, so 2 to the 8 is 256, minus 2 leaves 254 usable hosts. A /26 has 6 host bits, giving 64 total and 62 usable. The calculator does that for you and shows both the total and the usable count.
The network address is the first address in the subnet, with all host bits set to zero, and it names the subnet itself. The broadcast address is the last address, with all host bits set to one, and a packet sent there reaches every host on the subnet. Neither is assigned to a device, which is why the usable range sits between them, from the network plus one to the broadcast minus one.
A wildcard mask is the inverse of the subnet mask, with the bits flipped, so a mask of 255.255.255.0 becomes a wildcard of 0.0.0.255. Where a 0 in the wildcard means the bit must match, a 1 means anything goes in that spot. Access control lists on routers, especially Cisco gear, use wildcard masks rather than subnet masks, so it's handy to see both side by side here, and you won't have to flip the bits in your head.
You borrow bits from the host part. Pick how many equal subnets you want, and the tool works out the new prefix as the old prefix plus the log base 2 of that count, so a /24 split into 4 becomes four /26 blocks. Each block gets 2 to the power of the remaining host bits addresses, and the table lists every subnet with its own network, usable range, and broadcast. It's the fast way to carve a /24 into VLANs without stepping through the binary by hand.
Yes, there's a basic IPv6 panel. Enter an address like 2001:db8::1 and a prefix such as /64, and it returns the network prefix, the first and last address in the block, and the total address count. IPv6 has no broadcast address and no need to reserve the first and last host, so a /64 holds 2 to the 64 addresses, all usable. The count is computed with big-integer math so even a /48 or /32 shows an exact figure.
Yes, it's completely free, with no sign-up, and it runs right in your browser, so no addresses you enter leave your device. Type an IP, pick a prefix, and read the full breakdown in a tap. Bookmark it for network planning, splitting a block into VLANs, studying for a certification, or a homework problem, and you'll have an accurate subnet breakdown whenever you need it.
Related tools
More developer tools.
Text, code, and number utilities.
Binary TranslatorText to binary and number bases.
ASCII TableFull ASCII codes, hex, and binary.
Planning a network?
Work it out above, split a block into VLANs, or browse all the dev tools.