Subnet Calculator
NewIPv4 CIDR calculator: network, broadcast, host range and masks.
| # | Subnet | Host range | Broadcast | Usable |
|---|
IPv6 LANs are conventionally a /64. There are no broadcast or reserved network/broadcast addresses to subtract — every address in the prefix is usable.
| Prefix | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (p2p) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Runs entirely in your browser. Nothing is uploaded.
A subnet calculator for IPv4 and IPv6
This subnet calculator turns an IP address and a CIDR prefix — or a dotted subnet mask — into everything you need to plan, document or troubleshoot a network. Enter an address such as 192.168.1.10/24 and it instantly returns the network address, broadcast address, usable host range, total and usable host counts, the subnet mask and wildcard mask, the IP class, and whether the address is public, private or reserved.
It works for both IPv4 and IPv6, splits a network into smaller subnets, and shows the binary working behind every result. There's nothing to install and no sign-up — it runs entirely in your browser.
From CIDR or subnet mask to every address
Drag the prefix slider from /0 to /32 or pick a dotted mask like 255.255.255.0 — the two stay in sync, so the tool doubles as a CIDR-to-subnet-mask and subnet-mask-to-CIDR converter. For a /24 you'll see 256 total addresses, 254 usable hosts, a network of 192.168.1.0, a broadcast of 192.168.1.255 and a usable range of 192.168.1.1 – 192.168.1.254.
Special cases are handled correctly: a /31 exposes both addresses as a point-to-point link (RFC 3021) and a /32 describes a single host. Every field is one click to copy, and a 'Copy all' button grabs a tidy summary for tickets and runbooks.
See the binary — subnetting step by step
Subnetting clicks into place when you can see the bits. The visual binary view lines up the address, the subnet mask and the resulting network in binary, splitting each octet at the prefix boundary so the network bits and host bits are obvious. It's the bitwise AND that routers perform, shown step by step — ideal for students working toward CCNA, Network+ or any network engineering certification.
A compact address-map bar shows where your specific IP sits between the network and broadcast addresses, so the structure of the block is clear at a glance.
Split a network with VLSM
Cloud platforms hand you a CIDR block and expect you to carve it into subnets. The subnet splitter does exactly that: choose a longer prefix and the tool divides the network into equal blocks — a /24 into four /26s, eight /27s and so on — or enter the number of hosts each subnet needs and it picks the smallest prefix that fits (variable-length subnet masking, or VLSM).
Each resulting subnet is listed with its network address, usable host range, broadcast address and host count — the same plan you'd build for an AWS VPC, Azure Virtual Network, or GCP subnetwork.
How it compares to other subnet calculators
ipcalc (jodies.de) is the classic command-line reference tool, but it requires a terminal or copying commands into a web form with no VLSM splitting or visual binary alignment. Tunnelsup's subnet calculator is popular and simple but limited to IPv4, no VLSM, no binary view. SolarWinds' free subnet calculator is a Windows desktop app requiring download and install.
UtiloKit's subnet calculator runs directly in your browser on any device — desktop, iPhone, Android or tablet — with no install, no account, no data upload, and no ads. It handles IPv4 and IPv6, VLSM splitting, wildcard masks and a full binary view in one place.
CIDR cheat sheet and reference ranges
A built-in CIDR cheat sheet maps every common prefix to its mask, address count, usable hosts and wildcard — so /16, /24 and /30 stop being something you have to memorise. The calculator also flags private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback, link-local and CGNAT space, and shows the legacy IP class (A, B, C, D or E) for context.
Whether you're configuring a router or firewall, designing a VPC, or revising for an exam, the math is done precisely with bitwise operations rather than by hand.
Binary subnet math, step by step
Every subnetting result comes down to a bitwise AND. Take the address 192.168.1.100/26: convert the address to binary (11000000.10101000.00000001.01100100) and write the /26 mask below it (11111111.11111111.11111111.11000000). AND the two together — a 1 AND 1 stays 1, anything else becomes 0 — and you get 11000000.10101000.00000001.01000000, which translates back to 192.168.1.64: the network address.
To find the broadcast address, flip every mask bit to get the wildcard mask (00000000.00000000.00000000.00111111 = 0.0.0.63), then OR that wildcard with the network address. The OR forces all host bits to 1 and gives 11000000.10101000.00000001.01111111 = 192.168.1.127. The usable host range is therefore 192.168.1.65 through 192.168.1.126, with the host count calculated as 2^(32 − 26) − 2 = 64 − 2 = 62 usable hosts. The two subtracted addresses are the network address itself and the broadcast address — both reserved and unassignable to any device.
This AND/OR pair is exactly what every router performs in hardware millions of times per second. Once you can do it on paper for a /26, the same method applies to any prefix: replace the last octet's boundary with wherever the prefix lands, repeat the steps, and the network address and broadcast fall out automatically. The binary view in this calculator shows each step aligned by octet so you can follow the bit math for any address you enter.
CIDR notation and the end of classful addressing
Before 1993, IPv4 addresses were divided into rigid classes. A Class A address (first bit 0) gave an organisation 16.7 million host addresses — absurdly generous for almost everyone. Class B (first two bits 10) gave 65,534 hosts, which was too many for a medium business but too few to share. Class C (first three bits 110) gave only 254 hosts, forcing large networks to request dozens of Class C blocks. The result was a routing table explosion: by the early 1990s backbone routers were carrying over 50,000 routes and memory was running out.
Classless Inter-Domain Routing (CIDR), defined in RFC 1517–1520 in September 1993, discarded the class boundaries entirely and replaced them with the slash-prefix notation used today. Any prefix length from /0 to /32 is valid, so an ISP can assign exactly the block that fits a customer — a /22 for a campus of 1,000 hosts, a /30 for a point-to-point link — rather than forcing them into Class A, B or C pigeonholes. Route aggregation (also called supernetting) is the complementary benefit: an ISP holding 256 consecutive /24 blocks can advertise a single /16 to the global table, shrinking hundreds of routes into one. This aggregation is why the internet's routing table is around 900,000 routes today instead of the hundreds of millions it would otherwise need.
CIDR also defines how address space is delegated hierarchically. IANA allocates large blocks to the five Regional Internet Registries (ARIN for North America, RIPE NCC for Europe, APNIC for Asia-Pacific, LACNIC for Latin America, AFRINIC for Africa). Each RIR sub-allocates to ISPs in blocks typically ranging from /19 to /22, and ISPs further sub-allocate to customers. Every prefix in this hierarchy is a CIDR block, and each boundary between levels is just a longer prefix — a clean, scalable design that has carried the internet from its 1993 routing crisis to the present.
Private, public, and special-purpose IP ranges
RFC 1918 (1996) reserved three IPv4 ranges for private use: 10.0.0.0/8 (16.7 million addresses), 172.16.0.0/12 (1.05 million addresses, covering 172.16.0.0 through 172.31.255.255), and 192.168.0.0/16 (65,536 addresses). These ranges are never routed on the public internet. A home router, a corporate campus or a cloud VPC can all use the same 192.168.1.0/24 block without conflict because Network Address Translation (NAT) rewrites private source addresses to a single public IP when packets leave the private network. NAT is why a single residential IP can serve dozens of laptops, phones and smart devices simultaneously.
Beyond RFC 1918, several other ranges carry special meaning. 127.0.0.0/8 is the loopback range — any address here (most commonly 127.0.0.1) routes back to the local host without touching the network stack, used by applications to communicate with services running on the same machine. 169.254.0.0/16 is the link-local range (APIPA — Automatic Private IP Addressing): Windows and macOS assign an address from this block automatically when a DHCP server is unreachable, which is why seeing a 169.254.x.x address usually means a failed DHCP negotiation. 224.0.0.0/4 is reserved for multicast (one sender, many receivers), and 240.0.0.0/4 is officially reserved for future use.
CGNAT (Carrier-Grade NAT), defined in RFC 6598, uses the range 100.64.0.0/10 (100.64.0.0 through 100.127.255.255). As public IPv4 addresses became exhausted, ISPs began placing customers behind a second layer of NAT at the carrier level — your home router gets a 100.64.x.x address from the ISP rather than a true public IP, and the ISP's infrastructure NATes that to a shared public address. CGNAT breaks peer-to-peer applications and complicates self-hosting, which is one of the practical pressures pushing the industry toward IPv6 adoption.
Subnetting patterns and the mental-arithmetic shortcuts
Network engineers who subnet daily rarely convert to binary by hand. The fastest mental shortcut is the block size rule: subtract the interesting subnet mask octet from 256 to get the block size, then count up in multiples of that block to list the subnets. For a /26, the fourth-octet mask value is 192, so the block size is 256 − 192 = 64. Starting from 0: the subnets begin at 0, 64, 128, 192 — and the broadcast of each block is one below the next boundary (63, 127, 191, 255). For a /27 the mask octet is 224, block size is 32, giving subnets at 0, 32, 64, 96, 128, 160, 192, 224. This increment method (sometimes called the magic-number shortcut) extends to any octet: a /18 has a mask of 255.255.192.0, interesting octet is the third, block size 64, subnets at x.0.0, x.64.0, x.128.0, x.192.0.
The power-of-two table is worth memorising from /24 outward: /24 = 256 addresses (254 usable), /25 = 128 (126), /26 = 64 (62), /27 = 32 (30), /28 = 16 (14), /29 = 8 (6), /30 = 4 (2), /31 = 2 (point-to-point link, RFC 3021), /32 = 1 (host route). The /30 is the go-to for router-to-router links because it wastes only two addresses; the /29 fits a small server cluster with 6 usable hosts; the /28 suits a DMZ or management VLAN with up to 14 devices.
VLSM (Variable-Length Subnet Masking) takes this further: instead of dividing an address space into equal-sized blocks, you fit each subnet precisely to its need. A practical example — allocate 192.168.10.0/24 across five departments: Sales needs 100 hosts (/25, 126 usable, takes 192.168.10.0/25), Engineering needs 50 (/26, 62 usable, takes 192.168.10.128/26), HR needs 20 (/27, 30 usable, takes 192.168.10.192/27), Finance needs 10 (/28, 14 usable, takes 192.168.10.224/28), Management needs 5 (/29, 6 usable, takes 192.168.10.240/29). The remaining 192.168.10.248/29 stays in reserve — no address is wasted. VLSM is the technique behind efficient AWS VPC design, and the subnet splitter in this tool automates it: enter the host counts in order from largest to smallest and it assigns blocks with no overlap and no waste.
Private, instant and free
Every calculation happens locally in your browser, so the addresses and network plans you enter never leave your device and the tool keeps working offline. Bookmark this subnet calculator and reach for it whenever you need to convert a CIDR, find a host range, build a wildcard mask, or split a network — from your laptop or your phone, no account required.
Frequently asked questions
What is a subnet calculator?
A subnet calculator turns an IP address and a CIDR prefix (or subnet mask) into every value you need to plan or document a network: the network address, the broadcast address, the usable host range, total and usable host counts, the subnet mask, the wildcard mask, the IP class, and whether the address is public or private. This one also splits a network into smaller subnets (VLSM), shows the binary working, and supports both IPv4 and IPv6 — entirely in your browser with no upload needed.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation writes a network as an address followed by a slash and the number of network bits — the prefix length. For example, 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits identify hosts. A /24 prefix equals the subnet mask 255.255.255.0. The calculator converts either way as you type, so you can enter a dotted mask or a prefix and it syncs both instantly.
How do I calculate a subnet from CIDR notation?
Enter the IP and the prefix — say 192.168.1.10/24. The calculator masks the address with the prefix to find the network (192.168.1.0), sets the host bits to 1 for the broadcast (192.168.1.255), and lists the usable range as 192.168.1.1–192.168.1.254. It also shows the mask (255.255.255.0), the wildcard (0.0.0.255) and the host counts. Change the prefix with the slider and every value updates instantly.
How many hosts are in a /24?
A /24 has 8 host bits, so 2^8 = 256 total addresses. Two are reserved — the network address (.0) and the broadcast address (.255) — leaving 254 usable host addresses. As a rule of thumb, usable hosts = 2^(32 − prefix) − 2, so a /25 has 126 usable, a /26 has 62, a /27 has 30, and a /30 has just 2 (handy for point-to-point links). The cheat sheet inside the tool lists every prefix from /8 to /32.
What is subnetting?
Subnetting is the practice of dividing one larger IP network into several smaller logical networks (subnets) by borrowing bits from the host portion and adding them to the network portion. It lets you match address blocks to real needs, keep broadcast domains small, improve security with segmentation, and route traffic efficiently — which is why cloud VPCs on AWS, Azure and GCP ask you to carve a CIDR block into subnets.
What is an example of subnetting?
Take 192.168.1.0/24 (254 usable hosts) and split it into four equal /26 subnets by borrowing 2 host bits: 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26 and 192.168.1.192/26 — each with 62 usable hosts. Open the 'Split this network' panel, drag the new-prefix slider to /26, and the calculator lists all four subnets with their ranges and broadcast addresses.
What are the network and broadcast addresses?
The network address is the first address in a subnet — all host bits set to 0 — and names the subnet itself (e.g. 192.168.1.0/24). The broadcast address is the last address — all host bits set to 1 (e.g. 192.168.1.255) — and reaches every host on the subnet at once. Neither is assignable to a device, so the usable host range sits between them: 192.168.1.1 through 192.168.1.254.
What is a subnet mask?
A subnet mask is a 32-bit value that marks which part of an IPv4 address is the network and which part is the host. Network bits are 1s and host bits are 0s, so 255.255.255.0 (24 ones followed by 8 zeros) is the same as a /24 prefix. Apply the mask to an address with a bitwise AND and you get the network address — exactly what this tool shows in its binary view.
Is 255.255.255.0 a subnet mask?
Yes. 255.255.255.0 is one of the most common subnet masks — it equals a /24 prefix, with the first three octets (24 bits) for the network and the last octet (8 bits) for hosts, giving 256 addresses and 254 usable hosts. Its wildcard mask (the inverse, used in ACLs) is 0.0.0.255. Type it into the mask selector and the calculator sets the prefix to /24 automatically.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of the subnet mask: where the subnet mask has 1s the wildcard has 0s, and vice versa. The /24 mask 255.255.255.0 has the wildcard 0.0.0.255. Cisco access control lists and OSPF use wildcard masks to match ranges of addresses — a 0 bit means 'must match' and a 1 bit means 'don't care' — so the calculator reports it alongside the subnet mask automatically.
How do I split a network into smaller subnets?
Use the 'Split this network' panel. Choose a new, longer prefix than the base network — going from /24 to /26 creates 2^(26−24) = 4 subnets, and /27 creates 8 — or type how many hosts each subnet must hold and the tool picks the smallest prefix that fits (VLSM). It then lists every resulting subnet with its network address, host range, broadcast and usable count — the plan you'd build for an AWS or Azure VPC CIDR block.
How do I calculate a subnet for IPv6?
Switch the version toggle to IPv6 and enter an address with a prefix, e.g. 2001:db8::/48. IPv6 has a 128-bit address space, so instead of counting two reserved addresses you work with prefixes: a /64 is the standard subnet size for a single LAN. The calculator shows the network prefix, the first and last address in the block, the fully expanded form, and the total number of addresses as a power of two (a /48 holds 2^80 addresses).
What do /16, /24, and /30 mean?
The number after the slash is how many bits belong to the network. /16 (255.255.0.0) leaves 16 host bits — 65,536 addresses, 65,534 usable — typical of a large private range like 172.16.0.0/16. /24 (255.255.255.0) leaves 8 host bits — 256 addresses, 254 usable — the classic LAN size. /30 (255.255.255.252) leaves 2 host bits — 4 addresses, 2 usable — used for point-to-point router links.
How does this compare to paid subnet tools like SolarWinds or Cisco tools?
SolarWinds IP Address Manager and Cisco's Prime Infrastructure are full network management platforms costing hundreds or thousands of dollars per year — they're built for large enterprises tracking thousands of subnets across multiple sites. For one-off calculations, VLSM planning, binary visualization and CIDR conversion, a free browser-based tool does the same math instantly without requiring an agent, a license, a login, or any software install. This tool covers IPv4 and IPv6, VLSM, wildcard masks, and a cheat sheet — everything you need for network design and exam prep.
Does the subnet calculator work offline and keep my data private?
Yes. Every calculation — IPv4 and IPv6 masking, host counts, VLSM splitting and the binary view — runs locally in your browser with JavaScript. No IP address, network plan or result is ever sent to a server, so it works offline once the page has loaded and your data stays entirely on your device.
Related tools
View all toolsEmail Validator
Validate email syntax in bulk and catch common domain typos.
Browser & Screen Info
See your screen size, viewport, device and browser details locally.
What Is My IP Address
Find your public IP address, country, city and ISP — no data is stored or shared.
Retirement Calculator
Project your 401k or IRA balance at retirement with contributions, employer match and inflation adjustment.
Tax Bracket Calculator
See your 2024 US federal income tax bracket, effective rate and marginal rate — for any filing status.
Paycheck Calculator
Convert gross pay to net take-home pay after federal/state tax, Social Security and Medicare.