Cidr Notation Calculator
The Cidr Notation Calculator converts an IP address and a CIDR prefix into the three facts every network engineer needs from them: the subnet mask, the network address and the number of usable hosts per subnet. CIDR notation, the slash number written after an address such as 192.168.1.10/24, is compact and elegant, but what it means in dotted-decimal terms is not something most people can read at a glance.
CIDR, short for Classless Inter-Domain Routing, describes a network by how many of the address's 32 bits belong to the network and how many are left for hosts. The prefix length is that count of network bits. From it, the mask follows by filling those bits with ones, the network address follows by zeroing the host bits of any address in the network, and the host count follows from the bits remaining. The calculator also lets you say how many subnets you need to carve out, and it accounts for the extra bits that subnetting borrows.
This guide explains the notation from first principles, shows how to use the tool, and works two examples completely: a familiar home-style /24 network split four ways, and a /16 network split eight ways. No binary fluency is assumed; every step is shown in the dotted-decimal form you will actually configure.
What the Prefix Length Means
An IPv4 address is 32 bits long, written as four decimal octets for human convenience. The CIDR prefix length states how many of those bits, counted from the left, identify the network. A /24 means the first 24 bits, the first three octets, name the network, and the remaining 8 bits are free for hosts. A /16 reserves only two octets for the network and leaves 16 bits, and therefore far more addresses, for hosts.
Every address inside the same network shares the same network bits, which is how routers and devices decide what is local. Traffic for a local address is delivered directly; traffic for anything else goes to the gateway. The Cidr Notation Calculator makes the boundary visible by showing the mask and network address your prefix implies, so you can check a configuration before you deploy it rather than debugging it afterward.
The Subnet Mask and the Network Address
The subnet mask is the prefix written as an address: the network bits become 1s and the host bits become 0s. A /24 mask is 255.255.255.0, because 255 is eight 1-bits in decimal dress. A /26 mask is 255.255.255.192, where the last octet holds two network bits. Masks are the form most device settings actually ask for, which is why the calculator leads with this output.
The network address is the address of the network itself, found by keeping the network bits of your IP address and setting every host bit to zero. It is the first address in the range, it cannot be assigned to a device, and it is how the network is referred to in routing tables and documentation. If your calculated network address surprises you, your address and prefix are probably mismatched, and the calculator has just saved you a misconfiguration.
Usable Hosts and the Price of Subnetting
With h host bits, a subnet contains 2 to the power h addresses in total. Two of them are reserved: the network address itself and the broadcast address, the last address, used to reach every host at once. The usable hosts figure is therefore 2 to the power h minus 2, and it is the number of devices the subnet can actually number.
Subnetting spends host bits to buy organisation. When you ask the calculator for several subnets, it borrows enough bits from the host portion to create them: 4 subnets cost 2 bits, 8 subnets cost 3, and each borrowed bit halves the hosts each subnet can hold. That trade, more networks of smaller size, is the central planning decision in address design, and seeing the resulting host count immediately is what makes this tool useful at the whiteboard stage.
How to Use the Cidr Notation Calculator
The Cidr Notation Calculator needs three inputs: IP Address, CIDR Prefix Length and Number of Subnets Needed. Gather those figures first, then follow these steps.
- Enter the IP address in dotted decimal form, such as 192.168.1.10, using any address from the network you are analysing.
- Enter the CIDR prefix length, the number after the slash, between 0 and 32.
- Enter the number of subnets needed: 1 if you simply want the network described as it stands, or a higher number to plan a split.
- Press Calculate to see the subnet mask, the network address and the usable hosts per subnet after any borrowing.
- Adjust the subnets figure to test different splits before committing to a design. Press Reset to start a new network.
Worked Example 1: Splitting 192.168.1.10/24 Four Ways
A small office network uses addresses around 192.168.1.10 with a /24 prefix, and the administrator wants to split it into 4 subnets for departments.
Step 1: Enter the IP address as 192.168.1.10.
Step 2: Enter the CIDR prefix length as 24.
Step 3: Enter the number of subnets needed as 4.
Step 4: Read the subnet mask: a /24 fills three octets, giving 255.255.255.0.
Step 5: Read the network address: zeroing the host octet gives 192.168.1.0.
Step 6: Splitting into 4 subnets borrows 2 bits, leaving 6 host bits, so usable hosts per subnet are 2^6 minus 2 = 62.
Each department subnet can now number 62 devices, and the four subnets begin at 192.168.1.0, .64, .128 and .192 with the /26 mask the borrowed bits imply. The calculator's host figure is the check that the split still fits the office's device count.
Worked Example 2: Splitting 10.0.5.23/16 Eight Ways
A larger site numbers its network from 10.0.5.23 with a /16 prefix and plans to divide it into 8 subnets by building.
Step 1: Enter the IP address as 10.0.5.23.
Step 2: Enter the CIDR prefix length as 16.
Step 3: Enter the number of subnets needed as 8.
Step 4: The subnet mask for a /16 is 255.255.0.0.
Step 5: The network address, with the last two octets zeroed, is 10.0.0.0.
Step 6: Eight subnets borrow 3 bits from 16 host bits, leaving 13, so usable hosts per subnet are 2^13 minus 2 = 8190.
Even after an eight-way split, each building keeps over eight thousand usable addresses, far beyond need. That headroom is typical of /16 networks and is exactly why they are chosen for sites expecting growth: subnetting buys tidy organisation without ever threatening capacity.
Why CIDR Replaced the Old Class System
Early IP addressing divided networks into fixed classes with only three possible sizes, which wasted addresses on an enormous scale: an organisation needing 300 addresses received a block of over 65,000 or squeezed into 254. CIDR abolished the classes and let the prefix fall anywhere, so networks could be sized to actual need and routing tables could summarise many networks under one shorter prefix.
That history explains the notation's staying power. The slash number is the whole system in miniature: one integer that fixes the mask, the network boundary and the host capacity simultaneously. Tools like the Cidr Notation Calculator exist because humans configure devices in dotted decimal while thinking in prefixes, and translating faithfully between the two views prevents the small slips that cause large outages.
Planning Subnets Without Painting Yourself Into a Corner
Good subnet planning starts from device counts per segment, then rounds up generously. Choose subnet sizes that leave room to at least double, because renumbering a live network is painful and address space inside private ranges is effectively free. Borrow bits for the subnets you need now plus the ones a plausible reorganisation might ask for, and let the calculator show you the host cost of each option.
Keep the plan documented and consistent: the same mask across a site where possible, subnets allocated in tidy blocks, and infrastructure addresses placed by a visible convention. The arithmetic in this tool is instant; the discipline it supports is what makes a network understandable to the next engineer who inherits it, possibly at 3 a.m. during an incident.
Private Ranges and Where This Arithmetic Applies
The examples use the private ranges reserved for internal networks, 192.168.0.0/16 and 10.0.0.0/8, which anyone may use inside their own organisation without coordination. The same prefix arithmetic applies unchanged to public address space allocated by a provider; only the ownership differs.
Two special cases deserve care. A /31 link between two routers has, by the minus-2 rule, zero usable hosts, yet such links are legitimately used point-to-point under modern standards. A /32 describes a single host route. The calculator follows the conventional rule and will show the standard figures, which is right for general planning; specialist point-to-point designs are the exception that proves you should always know which convention your equipment follows.
Reading Your Result in Context
A single calculation is a snapshot, and snapshots reward a second look. Before you act on the result of the Cidr Notation Calculator, set it beside the figures you started with and ask whether the relationship between them makes sense. Results that surprise you are not necessarily wrong, but they always deserve one verification pass over the inputs, because the most common source of a strange answer is a transposed digit or a figure entered in the wrong unit.
Context also means comparing like with like. Run the Cidr Notation Calculator again with the alternative figures you are weighing, whether that is a different scenario, a revised measurement or a competing offer, and place the outputs side by side. Decisions are rarely between a number and nothing; they are between two numbers, and this tool is at its best when it produces both of them in the same terms.
Common Mistakes to Avoid
The most frequent errors with any calculator are boring ones, and that is good news, because boring errors are preventable. Entering a figure in the wrong unit, mixing figures from different dates or documents, and reading an output as something it is not account for nearly every bad result users report. A ten-second pause to check each input against its source document eliminates most of them before they happen.
The second family of mistakes is interpretive: treating an estimate as a guarantee, or a single calculation as the whole of a decision. The Cidr Notation Calculator gives you a structured, defensible figure for the part of the problem that arithmetic can settle. Judgement, evidence and timing settle the rest, and the strongest outcomes come from users who let each do its own job.
Practical Tips for Better Results
- 1. Enter any address from inside the network; the calculator derives the network address from it.
- 2. Remember the minus 2: network and broadcast addresses are never assignable to devices.
- 3. Round subnet counts up to the next power of two when planning; borrowed bits come in whole numbers.
- 4. Size subnets for at least double your current device count to avoid renumbering later.
- 5. Keep one consistent mask across a site wherever the design allows it.
- 6. Check the network address output; a surprise there means the address and prefix disagree.
- 7. Document the split you choose, including the new prefix each subnet carries.
- 8. Treat /31 and /32 as special cases used deliberately, not as general-purpose subnets.
Frequently Asked Questions
1. What does CIDR stand for?
Classless Inter-Domain Routing, the system that replaced fixed address classes with flexible prefix lengths.
Classless means the network boundary can fall at any bit, not just at the old class edges.
2. What does the number after the slash mean?
It is the prefix length: how many of the address's 32 bits identify the network.
A /24 leaves 8 bits for hosts, a /16 leaves 16, and a /8 leaves 24.
3. How is the subnet mask derived from the prefix?
Write that many 1-bits followed by 0-bits to make 32, then read the result as four decimal octets.
A /24 gives 255.255.255.0 and a /26 gives 255.255.255.192, because the last octet then holds two 1-bits.
4. Why are two addresses subtracted from the host count?
The first address names the network itself and the last is the broadcast address for reaching all hosts.
Neither can be assigned to a device, so usable hosts equal the total addresses minus two.
5. What is the network address used for?
It identifies the network in routing tables, documentation and configurations, and it is the base from which the address range runs.
Devices are numbered from the addresses after it, up to just before the broadcast address.
6. How many subnets do borrowed bits create?
Each borrowed bit doubles the subnet count: 1 bit makes 2 subnets, 2 bits make 4, 3 bits make 8.
That is why the calculator rounds your subnet request up to the next power of two in effect.
7. What happens to host capacity when I subnet?
Every borrowed bit halves the addresses in each subnet, because the bits move from the host portion to the network portion.
The calculator shows the resulting usable hosts so you can confirm each subnet still fits its devices.
8. Can the prefix be 32?
Yes. A /32 has no host bits and describes exactly one address, used for host routes.
A /31 is the other special case, used on point-to-point links under modern conventions.
9. What is a broadcast address?
The last address in a subnet, with all host bits set to 1, used to send traffic to every host in that subnet at once.
For 192.168.1.0/24 it is 192.168.1.255.
10. Does this work for private and public addresses alike?
Yes, the prefix, mask and host arithmetic is identical in both.
Private ranges are simply blocks reserved for internal use that never appear on the public internet.
11. Why does my device ask for a mask instead of a prefix?
Older configuration screens and some operating systems predate slash notation and expect the dotted mask.
The calculator's first output is exactly that dotted form, ready to copy into such screens.
12. What is supernetting?
Combining several networks under a shorter prefix, the reverse of subnetting, used to summarise routes.
It works because the networks share the same leading bits that the shorter prefix keeps.
13. How do I know if two addresses are on the same network?
Apply the mask to both: if the network portions match, they are on the same network and can talk directly.
If they differ, traffic between them must pass through a gateway or router.
14. What prefix should a home network use?
Almost all home routers use /24, giving 254 usable addresses, which comfortably covers household devices.
Larger or segmented home setups sometimes borrow a couple of bits, exactly as the first worked example shows.
15. Can I enter an IP address with a wrong octet, like 300?
No. Each octet must be between 0 and 255, because it represents eight bits.
The calculator asks you to correct any octet outside that range rather than guessing at the intended address.
CONCLUSION
The Cidr Notation Calculator turns a question that once needed scattered documents and slow arithmetic into a short, repeatable calculation: enter IP Address, CIDR Prefix Length and Number of Subnets Needed, and read Subnet Mask, Network Address and Usable Hosts Per Subnet. Use it before you commit, use it again when the figures change, and compare its result with reality afterwards. That simple habit, repeated consistently, is what separates decisions that hold from decisions that quietly unravel.
Bookmark this page and return to it whenever the question comes up again. Each visit takes a minute, costs nothing, and replaces uncertainty with a figure you can explain and defend. Clear numbers make for calm decisions, and calm decisions are usually the right ones.