A subnet calculator turns an IP address and a CIDR prefix into everything a network question needs: given 192.168.1.10/24, what is the network address, the broadcast address, and how many devices can actually join? Working that out by hand means converting to binary, masking bits, and counting powers of two — slow and error-prone.
This free subnet calculator does it instantly: drag the CIDR slider or type any IPv4 address to see the network, broadcast, first and last usable hosts, subnet and wildcard masks, and total versus usable addresses. A visual bit bar shows exactly which bits are network and which are host, every field carries a plain-English explanation, and a binary view reveals the underlying math. Students use this subnet calculator to check hand calculations; professionals use it to sanity-check network plans. No signup, no watermarks, everything in your browser.
Subnet Calculator
Enter an IP and CIDR — get the network, broadcast, host range, and more.
| Network addressThe subnet itself — the lowest address in the range. | – |
|---|---|
| Broadcast addressThe highest address — messages here reach every host. | – |
| First usable hostFirst address you can assign to a device. | – |
| Last usable hostLast address you can assign to a device. | – |
| Subnet maskDotted-decimal form of the /prefix. | – |
| Wildcard maskInverse of the mask — used in ACLs and routing. | – |
| Total addressesEvery address in the subnet, including network and broadcast. | – |
| Usable hostsAddresses you can actually assign to devices. | – |
| IP | – |
|---|---|
| Mask | – |
| Network | – |
🔒 100% private — everything runs in your browser, nothing is uploaded.
How to Use the Subnet Calculator
- Type any IPv4 address into the IP address box — it does not have to be a network address; the calculator finds the network for you.
- Drag the subnet size slider to set the CIDR prefix (0–32). Every result updates live.
- Read the results table: network, broadcast, first/last usable host, subnet mask, wildcard mask, and total vs usable addresses.
- Watch the bit bar — dark blue segments are network bits, light blue are host bits.
- Expand your understanding with the binary view, which shows the IP, mask, and network address in 32-bit binary.
- Try the example buttons (
10.0.0.5/8and172.16.5.130/26) to see very different subnet sizes side by side.
Features That Set This Tool Apart
- Visual bit bar — 32 blocks showing network vs host bits at a glance, the fastest way to build intuition.
- CIDR slider with live update — drag from /0 to /32 and watch every field change in real time.
- Beginner explanations — every result row carries a plain-English note saying what the value means and why it matters.
- Binary view — IP, mask, and network in 32-bit binary for students checking their hand calculations.
- Wildcard mask included — the inverse mask used in access-control lists and routing, which many calculators omit.
- Any IP accepted — enter a host address and the tool derives the network; no need to pre-compute anything.
CIDR Notation Explained
CIDR (Classless Inter-Domain Routing) notation writes an IP address followed by a slash and a number, like 192.168.1.10/24. The number is the prefix length: how many of the 32 bits identify the network. The remaining bits identify hosts on that network. In /24, the first 24 bits are the network portion (192.168.1) and the last 8 bits are host addresses (0–255). The equivalent subnet mask is 255.255.255.0 — 24 ones followed by 8 zeros in binary.
The mask is applied with a bitwise AND against the IP to find the network address: every bit where the mask has a 1 keeps the IP’s bit, where it has a 0 the result is 0. The broadcast address is the opposite extreme — network bits plus all host bits set to 1 — and it is how a message reaches every device on the subnet at once. The first and last addresses of the range are reserved (network and broadcast), so a /24 with 256 total addresses offers 254 usable hosts. Understanding the AND operation is what turns the numbers a subnet calculator outputs into real knowledge.
How Many Hosts in a /24? The Sizing Cheat Sheet
The formula is simple: a prefix of length n leaves 32 − n host bits, giving 2^(32−n) total addresses and (usually) 2^(32−n) − 2 usable hosts. The most common sizes are worth memorizing: a /24 holds 256 addresses (254 usable) — the classic small office or home network. A /16 holds 65,536 (65,534 usable). A /8 holds over 16.7 million. Going smaller, a /30 gives 4 addresses (2 usable) — the standard for point-to-point router links — while a /31 gives 2 addresses with a special rule allowing both to be used, and a /32 is a single host.
When sizing a network, always leave headroom: pick the smallest prefix whose usable count comfortably exceeds your device count plus growth, printers, phones, and guests. Running out of addresses in a /24 is one of the most common small-business networking headaches, and renumbering later is far more painful than starting with a /23. A subnet calculator makes this tangible: drag the slider through the common sizes and watch how quickly the host count doubles with each bit you give back.
Subnetting Mistakes Beginners Make
Four errors account for most subnetting trouble. First, confusing the network address with a usable host address: 192.168.1.0/24 identifies the subnet itself and cannot be assigned to a device, yet it appears in configs constantly. Second, forgetting that the broadcast address is also reserved — assigning 192.168.1.255 to a printer guarantees strange failures. Third, mixing up the subnet mask and the wildcard mask: the wildcard is the bitwise inverse (0.0.0.255 for a /24) and using one where the other belongs breaks ACLs and OSPF network statements.
Fourth, overlapping subnets when carving up a larger block — two /25 networks carved from one /24 must be .0/25 and .128/25, aligned on the bit boundary, not .0/25 and .100/25. When in doubt, let the subnet calculator show you the network and broadcast of each candidate: if the ranges overlap, the plan is wrong. These checks take seconds with the tool and save hours of debugging mysterious “works for some devices” outages.
Subnet Calculator: Frequently Asked Questions
What is a subnet mask?
A subnet mask is a 32-bit value that separates an IP address into its network and host portions. Wherever the mask has a 1 bit, the corresponding IP bit belongs to the network; wherever it has a 0, the bit belongs to the host. A /24 prefix equals the mask 255.255.255.0. Applying the mask to an IP with a bitwise AND yields the network address, which is how routers decide where to forward packets.
How many hosts are in a /24 network?
A /24 has 8 host bits, giving 2 to the 8th power = 256 total addresses, of which 254 are usable for devices. The network address (first) and broadcast address (last) are reserved and cannot be assigned. Common neighbors: a /25 holds 126 usable hosts, a /23 holds 510, a /16 holds 65,534, and a /30 holds just 2, typically used for point-to-point links between routers.
What does CIDR notation mean?
CIDR notation appends a slash and a prefix length to an IP address, like 192.168.1.0/24. The number says how many of the 32 bits are the network portion; the rest are host bits. It replaced the old class A/B/C system because it allows subnets of any size, not just three fixed ones. Larger prefix numbers mean smaller networks: /32 is a single host, /0 is the entire IPv4 internet.
What is the difference between the network and broadcast address?
The network address is the first address in a subnet, with all host bits set to 0 — it identifies the subnet itself and is never assigned to a device. The broadcast address is the last address, with all host bits set to 1 — packets sent to it are delivered to every host on the subnet. Usable device addresses are everything in between, from network+1 to broadcast−1.
What is a wildcard mask and when do I need one?
A wildcard mask is the bitwise inverse of the subnet mask: 0.0.0.255 for a /24. It is used in Cisco-style access-control lists and some routing protocol statements to say which address bits must match and which can vary — 0 means must match, 255 means ignore. If your calculator only shows the subnet mask, subtract each octet from 255 to get the wildcard by hand.
Related Free Tools
- Binary Translator — subnet math is binary math; convert between text, binary, and hex.
- Number Base Converter — convert masks and addresses between binary, decimal, and hex.
- Unix Timestamp Converter — epoch timestamps to readable dates and back.
- All Free Tools — browse the complete collection of free online tools.
Subnetting clicks the moment you can see the bits move — and that is what this subnet calculator is built for. Drag the CIDR slider, watch the bit bar split network from host, and read plain-English explanations for every value from network address to wildcard mask. Everything runs in your browser, so practice as much as you like. The next time someone asks how many hosts fit in a /26, you’ll answer before reaching for the tool.