🌐 IP Subnet Calculator

IP Subnet Calculator — CIDR & Subnet Mask Tool

Enter any IPv4 address with a CIDR prefix or subnet mask to instantly get the network address, broadcast address, usable host range, wildcard mask, binary/hex breakdown, and classification. Includes a VLSM planner, subnet list generator, and reverse calculators for required hosts or subnets.

🔒 Runs 100% in your browser — no IP data is ever sent to a server.

  • Instant results
  • VLSM planner
  • Subnet list generator
  • CCNA-accurate math
  • No signup
Network bits Host bits

Subnet list generator — split this network further

Splitting /24 into /26 creates 4 subnets of 64 addresses each.

Supernet (route summarization)

The next larger block (prefix − 1) that contains this network, useful for route aggregation.

Enter how many usable host addresses you need — the calculator finds the smallest CIDR block that fits, starting from a base network of your choice.

Enter a base network and how many equal-sized subnets you need — the calculator borrows the minimum number of bits and lists every resulting subnet.

Plan variable-length subnets for multiple departments or sites from one base network — each gets the smallest block that fits its host requirement, allocated largest-first to avoid waste.

Built for Networking Professionals

💻100% browser-based

Nothing sent to a server.

Instant calculation

Updates as you type.

🔓No registration

Open and use immediately.

♾️Free forever

No limits, no premium tier.

🎓CCNA-accurate

Standard RFC 950/4632 math.

Deeper Than a Basic Subnet Calculator

🧮VLSM planner

Allocate variable-size subnets.

🧩Subnet list generator

Split a network into all children.

🔍Reverse calculators

From host or subnet count.

🎚️Live CIDR slider

Drag to see bits shift live.

📤CSV, JSON, PDF export

Take results anywhere.

Built for Every Networking Workflow

🎓 CCNA / CCNP Study

Verify subnetting practice problems instantly and see the binary math behind every answer.

🏢 Enterprise Network Design

Plan VLANs and department subnets with VLSM to avoid wasting address space.

☁️ Cloud VPC Planning

Size non-overlapping CIDR blocks for AWS VPCs, Azure VNets, or GCP networks.

🐳 Kubernetes & Docker

Plan pod, service, and bridge network CIDR ranges without collisions.

🔐 Security & Firewall Rules

Compute exact wildcard masks for Cisco ACLs and OSPF network statements.

🖥️ System Administration

Quickly check whether an IP is private, reserved, or routable before troubleshooting.

How ToolAdda Compares

FeatureToolAddaCalculator.netMXToolbox / IPVoid
VLSM planner built inYesNoNo
Subnet list generatorYesLimitedNo
Live binary bit visualizationYesNoNo
Reverse (required hosts/subnets) calculatorsYesPartialNo
CSV / JSON / PDF exportYesNoNo
No data leaves your browserYesYesServer-based lookups
Dark modeYesNoNo

CIDR Reference Table

Click any row to load it into the calculator above.

CIDRSubnet maskWildcard maskTotal addressesUsable hosts

Private, Reserved & Special-Use IPv4 Ranges

RangeCIDRPurpose
10.0.0.0 – 10.255.255.25510.0.0.0/8Private (RFC 1918)
172.16.0.0 – 172.31.255.255172.16.0.0/12Private (RFC 1918)
192.168.0.0 – 192.168.255.255192.168.0.0/16Private (RFC 1918)
100.64.0.0 – 100.127.255.255100.64.0.0/10Shared / CGNAT (RFC 6598)
127.0.0.0 – 127.255.255.255127.0.0.0/8Loopback (RFC 990)
169.254.0.0 – 169.254.255.255169.254.0.0/16Link-local / APIPA (RFC 3927)
192.0.2.0 – 192.0.2.255192.0.2.0/24Documentation TEST-NET-1 (RFC 5737)
198.51.100.0 – 198.51.100.255198.51.100.0/24Documentation TEST-NET-2 (RFC 5737)
203.0.113.0 – 203.0.113.255203.0.113.0/24Documentation TEST-NET-3 (RFC 5737)
198.18.0.0 – 198.19.255.255198.18.0.0/15Benchmarking (RFC 2544)
224.0.0.0 – 239.255.255.255224.0.0.0/4Multicast (RFC 5771)
240.0.0.0 – 255.255.255.254240.0.0.0/4Reserved for future use (RFC 1112)
255.255.255.255255.255.255.255/32Limited broadcast

What Is an IP Subnet Calculator?

An IP subnet calculator is a tool that takes an IPv4 address plus a prefix length (CIDR notation or a dotted subnet mask) and computes every derived value a network engineer needs: the network address, the broadcast address, the usable range of host addresses, the wildcard mask, and how many total and usable addresses the block contains. It automates arithmetic that's entirely mechanical but tedious and error-prone to do by hand — binary math on 32-bit numbers, bit borrowing, and boundary alignment — the same skills tested on the CCNA exam and used daily by network engineers, DevOps teams, and cloud architects.

What Is an IPv4 Address?

An IPv4 address is a 32-bit number that uniquely identifies a device on a network, conventionally written as four decimal numbers from 0–255 separated by dots — 192.168.1.1, for example. Each of those four numbers, called an octet, represents 8 bits, so the full address is really just a 32-digit binary number split into readable chunks. Because it's only 32 bits, IPv4 provides roughly 4.3 billion possible addresses — a number that felt enormous in 1981 and has been under pressure ever since the public internet scaled past it, which is part of why private addressing (RFC 1918), NAT, and eventually IPv6 all exist.

What Is CIDR?

CIDR (Classless Inter-Domain Routing), introduced in 1993 by RFC 1518/1519, replaced the original rigid "classful" addressing scheme with a flexible notation: an IP address followed by a slash and a number, like 192.168.1.0/24, where the number states how many of the 32 bits form the network portion. This single change let network designers create subnets of any size instead of being locked into fixed Class A/B/C boundaries, and it's the reason the internet's routing tables didn't collapse under their own growth in the 1990s.

What Is a Subnet Mask?

A subnet mask expresses the exact same information as a CIDR prefix, just in dotted-decimal form: 255.255.255.0 is mathematically identical to /24. Both describe a 32-bit pattern of contiguous 1s (network bits) followed by contiguous 0s (host bits) — a subnet mask is only valid if its binary form never has a 0 followed later by a 1. This calculator accepts either format and treats them as fully interchangeable.

How Subnetting Works

Subnetting works by "borrowing" bits from the host portion of an address and reassigning them to the network portion, which shrinks each individual subnet's size but creates more of them. Borrowing one bit from a /24 doubles the number of subnets (to 2) while halving each one's size (to /25, 128 addresses); borrowing two bits quadruples the subnet count (to 4) at /26 (64 addresses each), and so on. The relationship is always a clean power of two: borrowing n bits creates 2ⁿ subnets, each with 2^(32−prefix) total addresses.

Binary Representation Explained

Every IPv4 calculation ultimately reduces to binary arithmetic on 32 bits. The subnet mask is ANDed with the IP address to isolate the network address; the mask is bitwise-inverted (giving the wildcard mask) and ORed with the network address to compute the broadcast address. This calculator's live bit visualization shows exactly which of the 32 bits are network bits (fixed, shared by every device on the subnet) versus host bits (variable, unique per device) — dragging the CIDR slider moves that boundary in real time so the relationship becomes visually obvious rather than abstract.

Network Bits vs. Host Bits

Network bits are the leading bits shared by every address in a subnet — they define which subnet an address belongs to. Host bits are the remaining trailing bits, and every possible combination of them (except all-zeros and all-ones, which are reserved) identifies a specific usable device address within that subnet. A /24 has 24 network bits and 8 host bits, giving 2⁸ = 256 total combinations, 254 of them usable.

Network Address

The network address is the subnet's own identity — the address with every host bit set to 0. It's never assigned to a device; routers use it to refer to the subnet as a whole in routing tables. For 192.168.1.0/24, the network address is 192.168.1.0 itself.

Broadcast Address

The broadcast address is the subnet's last address, with every host bit set to 1, used to send a single packet to every host on that local segment at once. For 192.168.1.0/24, that's 192.168.1.255. Like the network address, it's reserved and can't be assigned to a device (except in the /31 special case covered below).

Usable Host Range

The usable host range is every address between the network and broadcast address, excluding both — for 192.168.1.0/24, that's 192.168.1.1 through 192.168.1.254. Two well-known exceptions matter for exam questions and real configuration alike: a /31 (RFC 3021) has no reserved network or broadcast address and offers both its addresses as usable, standard for point-to-point WAN links; a /32 identifies exactly one address, used for host routes and loopback interfaces.

Public vs. Private IP Addresses

RFC 1918 reserves three ranges — 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — for private use inside organizations; routers on the public internet never forward traffic to or from these ranges directly, which is why home and office networks reuse them freely alongside Network Address Translation (NAT). Every other IPv4 address (outside private, loopback, link-local, multicast, and other reserved ranges) is potentially publicly routable. This calculator flags which category any address you enter falls into.

Classes of IPv4 Networks

Before CIDR, addresses were divided into classes purely by their first octet: Class A (1–126, implying a /8), Class B (128–191, implying a /16), Class C (192–223, implying a /24), Class D (224–239, reserved for multicast), and Class E (240–255, reserved for experimental use). Classful addressing is obsolete for routing purposes — CIDR lets any prefix apply to any address — but the class labels are still commonly referenced in documentation and certification exams, so this calculator reports both the legacy class and the modern CIDR-based classification.

CIDR Prefix Chart

The full reference table above lists every prefix from /0 to /32 with its subnet mask, wildcard mask, total address count, and usable host count. A few are worth memorizing for quick mental math: /24 (254 hosts), /25 (126 hosts), /26 (62 hosts), /27 (30 hosts), /28 (14 hosts), /29 (6 hosts), /30 (2 hosts) — each step halves the previous host count, which is the fastest way to sanity-check a subnetting answer without a calculator at all.

VLSM Explained

Variable Length Subnet Masking assigns a different prefix length to each subnet based on its actual host requirement, instead of forcing every subnet in a network to share one uniform mask. A department needing 100 hosts gets a /25; a point-to-point link needing 2 addresses gets a /30 — allocated correctly, VLSM can turn a network that would only support a handful of equally-sized subnets into dozens of appropriately-sized ones. The standard allocation strategy (and the one this tool's VLSM planner implements) is to sort requirements largest-first and allocate each into the smallest block that fits, which avoids fragmenting the address space with wasted gaps.

Supernetting Explained

Supernetting is the inverse of subnetting: combining multiple contiguous, equally-sized networks into one larger block that can be advertised as a single route — the mechanism behind CIDR route aggregation across the entire public internet's routing tables. Two adjacent /24s that share the same /23 parent (differing only in their lowest network bit) can be summarized as one /23 route, halving the number of routes a router needs to track for that address space.

Network Planning Examples

A typical small office might allocate 192.168.1.0/24 for general staff (254 hosts), 192.168.2.0/26 for a guest Wi-Fi network isolated by VLAN (62 hosts), and 192.168.2.64/30 for a router-to-firewall link (2 hosts) — three subnets, three different sizes, planned with VLSM instead of wasting a /24 on a 2-address link.

Enterprise Network Design and VLANs

Larger networks pair subnetting with VLANs (Virtual LANs) — each VLAN typically maps to its own subnet, letting a single physical switch infrastructure logically separate departments, guest traffic, VoIP, and server segments without separate cabling. Getting the subnet sizes right during design (using VLSM rather than one-size-fits-all) is what keeps the address plan from needing a disruptive re-architecture as the organization grows.

Subnetting in Cloud and Container Networking

Cloud platforms didn't replace subnetting — they just moved it into a console. An AWS VPC is defined by a CIDR block (commonly a /16), subdivided into smaller subnets per availability zone; AWS additionally reserves 5 addresses in every subnet for internal networking purposes, on top of the standard network/broadcast reservation. Azure Virtual Networks and subnets work almost identically, also reserving 5 addresses per subnet. Google Cloud VPC networks use a similar CIDR-based subnet model, though GCP subnets can span multiple zones within a region. Container orchestration adds another layer: Kubernetes clusters need distinct, non-overlapping CIDR ranges for the cluster network, pod network, and service network, and Docker's default bridge network allocates its own private subnet for container-to-container communication. In every case, the underlying math this calculator performs — network address, broadcast, usable range — is exactly what you're planning when you type a CIDR block into any of these consoles.

Subnetting for CCNA and CCNP Exams

Subnetting is one of the highest-value topics on the CCNA exam because it's tested constantly across multiple question formats — fill-in-the-blank, drag-and-drop, and embedded inside larger scenario questions — and because real speed matters under exam time pressure. The fastest path to fluency is memorizing the power-of-two host counts per prefix (covered above) and practicing the "magic number" method: subtract the interesting octet's mask value from 256 to get the block size, then count in that increment to find subnet boundaries. Use this calculator to check your manual answers while you build that speed, not as a permanent substitute for doing the math yourself — exams don't allow calculators, so the mental shortcuts are the actual skill being tested. CCNP-level design questions build on the same foundation with VLSM and route summarization across multi-router topologies, which is exactly what the VLSM planner and supernet view above are built to illustrate.

Common Subnetting Mistakes

  • Forgetting the network and broadcast reservation. A /24 has 256 total addresses but only 254 usable — a very common off-by-two error.
  • Misaligning subnet boundaries. Subnets must start on a multiple of their own block size; picking an arbitrary starting address instead of a valid boundary produces overlapping or invalid ranges.
  • Assuming /31 and /32 follow the "minus 2" rule. They don't — /31 has 2 usable addresses and /32 has exactly 1.
  • Confusing a subnet mask with a wildcard mask. They're bitwise inverses of each other; using one where the other is expected (a frequent ACL misconfiguration) silently matches the wrong addresses.
  • Overlapping VPC or VLSM ranges. Always verify new subnet ranges don't intersect existing ones before deploying — a mistake that's easy to make by hand and easy to catch with a generated subnet list.

Security Best Practices for Subnetting

Segment by function and trust level, not just by convenience — put guest Wi-Fi, IoT devices, servers, and staff workstations in separate subnets so a firewall or ACL can enforce which segments may talk to which, containing a compromise instead of letting it spread laterally across a flat network. Use the smallest subnet that reasonably fits each segment's growth plan rather than defaulting every VLAN to a /24; oversized subnets waste address space and, more importantly, put more devices inside a single broadcast domain and a single blast radius than necessary.

IP Subnet Calculator — Frequently Asked Questions

What is subnetting?

Dividing a larger IP network into smaller, logically separated networks by borrowing bits from the host portion for network identification.

How do I calculate a subnet?

Enter an IPv4 address and a CIDR prefix or subnet mask — the calculator instantly computes every derived value.

What is CIDR notation?

A slash and number appended to an IP, like /24, indicating how many leading bits form the network portion.

What is a subnet mask?

A dotted-decimal value like 255.255.255.0 that's mathematically equivalent to a CIDR prefix.

What is a wildcard mask?

The bitwise inverse of a subnet mask, used in Cisco ACLs and OSPF configuration.

What is a broadcast address?

The last address in a subnet (all host bits set to 1), used to reach every device on the segment at once.

What is a network address?

The first address in a subnet (all host bits set to 0), identifying the subnet itself.

How many hosts fit in a /24?

256 total addresses, 254 usable after reserving the network and broadcast address.

How many hosts fit in a /30?

4 total addresses, 2 usable — the standard size for a point-to-point link.

Why don't /31 and /32 follow the usual rule?

RFC 3021 gives /31 exactly 2 usable addresses with no reservation; /32 identifies a single host route with 1 usable address.

What is VLSM?

Variable Length Subnet Masking — sizing each subnet's prefix to match its actual host requirement instead of one uniform mask.

What is supernetting?

Combining multiple contiguous networks into one larger block advertised as a single route.

What's the difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses. This calculator currently supports IPv4 only.

Can I subnet private IP addresses?

Yes — private and public ranges work identically, and the tool flags which type you entered.

Does it support subnet mask input as well as CIDR?

Yes — toggle between /CIDR and a dotted subnet mask; both produce identical results.

How accurate is the calculator?

It uses standard 32-bit binary arithmetic per RFC 950/4632 — the same rules used by real routers.

Can I use it for AWS VPC planning?

Yes — standard CIDR math applies; AWS separately reserves 5 addresses per subnet.

Can I use it for Azure virtual networks?

Yes — Azure VNets use the same CIDR model, also reserving 5 addresses per subnet.

Can I use it for Kubernetes CIDR planning?

Yes — cluster, pod, and service CIDR ranges are standard IPv4 blocks the calculator and VLSM planner can size.

Is the calculator free?

Yes — completely free with no signup or limits.

Does it work offline?

Yes — once loaded, all math runs locally with no network requests.

Is my IP data sent anywhere?

No — every calculation happens entirely in your browser.

What's the difference between a network class and CIDR?

Classful addressing was a rigid 1981 scheme; CIDR (1993) decouples prefix length from address range entirely.

How do I find the number of subnets from a prefix?

2 raised to the number of borrowed bits — borrowing 2 bits creates 4 subnets.

What is a default gateway and how is it chosen?

The router address devices use to reach other networks — by convention often the first usable address.

What does 'usable hosts' mean vs 'total addresses'?

Total addresses includes the network and broadcast address; usable hosts excludes both (except /31 and /32).

Can I generate a list of all subnets in a range?

Yes — the Subnet List Generator splits a base network into equal-sized subnets at any new prefix.

What is reverse DNS (in-addr.arpa)?

Mapping an IP back to a hostname via PTR records, with octets reversed under the in-addr.arpa domain.

Ready to calculate your subnet?

No signup, no limits — instant, accurate subnet math in your browser.

Calculate a subnet now