IPv4 Subnet Calculator
IPv4 Subnet Calculator. Enter an IP Address and pick a CIDR / Prefix Length, then click Calculate in this subnet calculator to get your mask, network, broadcast and host range.
Input Parameters
Quick Reference
Critical Network Information
KEY VALUESNetwork Details
Binary View
Enter your IP address and select a CIDR prefix length to instantly calculate your subnet mask, network address, broadcast address, usable host range, and wildcard mask for any IPv4 subnet. Get complete IP subnetting details including network class, total addresses, and binary representations — all in one click.
Point an IPv4 or IPv6 address at the Subnet Calculator above and it instantly hands back the network address, broadcast address, and host range you'd otherwise work out by hand. This IP subnet calculator handles classful and CIDR-based addressing alike, so whether you're segmenting a home network or planning address allocation across a data center, you get accurate results in seconds. Some sites call this same kind of tool a plain IP calculator, a CIDR calculator, a netmask calculator, or an IP address calculator — they all solve the identical problem of turning an address and a mask into network, broadcast, and host details.
What Is an IP Subnet Calculator and How Does It Work?
An online tool like this one takes a single IP address plus a mask or prefix length and works out every value that address implies: the network it belongs to, the range of hosts it can address, and the address used to reach every device on that segment at once. Instead of converting octets to binary by hand, you enter the address and let the tool do the arithmetic — a single mistyped bit in a manually calculated mask can overlap two networks or strand a block of usable addresses nobody can assign. Subnetting is the underlying practice this tool automates: splitting one IP network into smaller, more manageable pieces.
How an IP Subnet Calculator Works
It handles all of that arithmetic in one pass — enter an address and a mask, and it hands back the values you'd otherwise have to derive by hand.
Subnetting Calculator Basics and Key Terms
Every address splits into two pieces once a mask is applied: a network part that names the subnet, and a host part — traditionally called the host identifier, or the rest field in older RFCs — that names one specific device within it. A subnetting calculator exposes both pieces at once, along with the network prefix, the fixed leading bits every address in that subnet shares, and the prefix size, how many bits long that prefix is.
Subnet Mask Calculator Basics: Network Mask and CIDR Notation
A subnet mask — sometimes called a network mask — is a 32-bit value that sits alongside an IP address and marks which bits belong to the network and which belong to the host. Wherever the mask has a 1, that bit is part of the network; wherever it has a 0, it's available to identify a device. Before Classless Inter-Domain Routing existed, this split was rigid and tied to network class; CIDR notation freed network administrators to draw that line wherever a given allocation needed it.
IPv4 addresses and masks are written in dotted decimal notation — four numbers separated by periods — purely for human readability underneath what's really a 32-bit binary number. A subnet mask calculator converts freely between that dotted form and the CIDR shorthand, such as /24, which simply counts how many leading bits are fixed as network bits.
Wildcard Mask and Subnet ID
The wildcard mask is the inverse of a subnet mask, most often seen in access control lists and OSPF configuration, where a device needs to say "any value is fine here" instead of "this exact value is required." The subnet id is the CIDR-notated address that names the block itself — the combination most tools display first in any result set.
Free Subnet Calculator Reference: Class A, B, and C Explained
Before CIDR, every IPv4 address belonged to a fixed network class that determined its default mask automatically. Most calculators will still let you pick a class as a shortcut, since the table below still shapes how most subnetting guides are organized even though CIDR made it optional in practice.
| Network Class | First Octet Range | Default Subnet Mask | CIDR | Usable Hosts |
|---|---|---|---|---|
| Class A | 1 – 126 | 255.0.0.0 | /8 | 16,777,214 |
| Class B | 128 – 191 | 255.255.0.0 | /16 | 65,534 |
| Class C | 192 – 223 | 255.255.255.0 | /24 | 254 |
Two further classes exist outside this everyday range: Class D is reserved for multicasting, and Class E is set aside for experimental use, so a calculator won't offer it as a normal allocation option. A Class A block is far larger than almost any organization needs on its own, which is exactly why carving one large class-based block into smaller, right-sized network devices groupings became standard practice.
CIDR Calculator Formula: Prefix Length, Subnet Bits, and Usable Hosts
Every time you shrink a network to create more, smaller subnets, you're borrowing subnet bits from the host portion of the address and handing them to the network portion. The math behind that trade comes down to two formulas. First, usable hosts in a subnet with prefix length \(p\):
$$H = 2^{(32 - p)} - 2$$
The subtraction of 2 accounts for the network address and the broadcast address, neither of which can be assigned to a device. Second, the number of subnets created by borrowing \(s\) bits from a base network:
$$S = 2^{s}$$
Worked Example Using an IP Range Calculator
Run this through any IP range calculator and you can check it by hand: starting from a Class C network (/24) and borrowing 2 subnet bits gives a /26 prefix. Usable hosts per subnet: \(2^{(32-26)} - 2 = 2^{6} - 2 = 62\). Number of subnets created: \(2^{2} = 4\).
| Prefix Length | Subnet Mask | Wildcard Mask | Usable Hosts | Subnets (from /24) |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 0.0.0.255 | 254 | 1 |
| /25 | 255.255.255.128 | 0.0.0.127 | 126 | 2 |
| /26 | 255.255.255.192 | 0.0.0.63 | 62 | 4 |
| /27 | 255.255.255.224 | 0.0.0.31 | 30 | 8 |
| /28 | 255.255.255.240 | 0.0.0.15 | 14 | 16 |
| /29 | 255.255.255.248 | 0.0.0.7 | 6 | 32 |
| /30 | 255.255.255.252 | 0.0.0.3 | 2 | 64 |
IPv4 vs. IPv6 Subnetting and Everyday CIDR Calculator Uses
IPv4 Subnet Calculator vs. IPv6 Subnet Calculator
Run the numbers in IPv4 mode and you're working with a 32-bit address split into four octets and a dotted-decimal mask. Switch to IPv6 instead and the scale changes: addresses are 128 bits, written in hexadecimal, and grouped into eight 16-bit sections. IPv6 drops the concept of a broadcast entirely — multicasting handles the "send to a group" case — and it drops the dotted mask in favor of prefix length alone. The underlying Internet Protocol logic stays identical either way: a longer prefix means fewer host bits and a smaller subnetwork.
Online Subnet Calculator Results: Network Address, Broadcast Address, and Host Range
The network address is always the first address in a subnet and can never be assigned to a device — it identifies the subnet as a whole, the way a street name identifies every house on it without pointing to any one door. The last address in that same block is reserved for sending a single packet to every host at once. Everything between those two boundaries is the usable host range — the addresses actually available for routers, servers, and workstations. Any results panel will list all three the moment you enter an address.
Finding the Host Range by Hand
To find that range by hand, take the network address and add 1 to get the start address, then take the last address and subtract 1 to get the end address. For the 192.168.1.0/25 example above, the start address is 192.168.1.1 and the end address is 192.168.1.126 — 126 addresses, matching the formula's result exactly. Every device that needs a default gateway, DNS server, or static assignment on that subnet draws its address from within this span.
Advanced Techniques and Everyday IP Range Calculator Uses
Advanced Subnet Calculator Techniques: Supernetting and Routing
Larger organizations often combine several contiguous subnets back into a single advertised route using a supernet — this reverse process is called supernetting, and any capable tool will support it. A router sits at the boundary between subnets and relies on a routing table, built manually or dynamically, to decide where to forward each packet next; every entry in that table is effectively a routing prefix paired with a next-hop address. A shorter routing prefix summarizes more address space in one entry, which is exactly what makes supernetting useful for keeping routing tables from growing unmanageably as a network scales.
Supernet vs. Subnet: When to Use a Supernet Calculator
Reach for a supernet calculator when you're aggregating routes upward rather than dividing a block downward — the two operations are mirror images of the same CIDR math, just run in opposite directions.
Real-World Uses for a Network Subnet Calculator
This kind of tool is routine equipment for network administrators and IT professionals across networking as a whole. Whether you're handling network administration for a small office, network management at an enterprise, or supporting an internet service provider's backbone, this kind of tool saves real time. Every network engineer studying for CompTIA Network+ certification learns this math early, and it stays central to network design, ongoing network monitoring, and network troubleshooting sessions when a device suddenly can't reach the rest of the network. Getting subnet boundaries right also matters for cybersecurity, since isolating sensitive systems onto their own subnet limits how far an attacker can move if one device is compromised. Day-to-day network performance improves too, once network traffic is contained to smaller segments instead of flooding one flat network — and it's easier to keep a private IP range straight from a public IP block when each lives in its own clearly documented subnet.
Troubleshooting, IP Address Management, and Network Design
When a device can't reach the rest of the network, checking whether its IP address and mask actually place it on the intended subnet is one of the first diagnostic steps. Beyond one-off troubleshooting, this same logic scales into full IP address management: DHCP servers hand out addresses scoped to a particular subnet, DNS and reverse DNS records rely on the in-addr.arpa domain to map an address back to a hostname, and a dedicated IP address manager platform tracks which addresses in a pool are free versus assigned. Some calculators also surface a hex ID, binary ID, and integer ID for the same address, or an IPv6 transition value like the 6to4 prefix, which embeds a 32-bit IPv4 address inside a 128-bit IPv6 one. A visual subnet bitmap can make it easier to see exactly which bits were borrowed — one more piece of manual network calculations this tool exists to replace.
Comments & Feedback
Share your experience or ask questions about this tool