Subnet Calculator — IPv4 & IPv6 CIDR, VLSM and Overlaps
Network, broadcast, host range and mask for any CIDR; split networks with VLSM, expand IPv6 and find overlapping ranges.
| Network address | 192.168.1.128 |
|---|---|
| Broadcast address | 192.168.1.191 |
| First usable host | 192.168.1.129 |
| Last usable host | 192.168.1.190 |
| Usable hosts | 62 |
| Total addresses | 64 |
| Subnet mask | 255.255.255.192 |
| Wildcard mask | 0.0.0.63 |
| CIDR notation | 192.168.1.128/26 |
| IP class (historical) | C |
| Address type | Private network (RFC 1918) |
The first address identifies the network and the last is the broadcast address, so neither can be assigned to a host. 192.168.1.130 is a host inside 192.168.1.128/26; the network address is 192.168.1.128.
Address 11000000.10101000.00000001.10000010 Mask 11111111.11111111.11111111.11000000 Network 11000000.10101000.00000001.10000000 Broadcast 11000000.10101000.00000001.10111111
Runs entirely in your browser. No address you enter is sent anywhere. Browse all free tools.
Found a problem, or something that could be better? We read every message and we fix things quickly.
This subnet calculator works out the network address, broadcast address, usable host range, host count, subnet mask and wildcard mask for any IPv4 CIDR block or IP address and mask, and shows the binary breakdown and whether the range is private, public or reserved. It follows RFC 3021 for /31 point-to-point links (two usable addresses, no broadcast) and treats /32 as a single host.
It also plans networks: split a block into equal subnets or allocate subnets of different sizes with VLSM, then export the plan as CSV. For IPv6 it expands and compresses addresses in the RFC 5952 canonical form and gives the range and size of any prefix. The overlap checker takes a list of CIDRs, such as VPC, VPN and office ranges, and reports which ones collide. Everything is calculated in your browser.
How to use
- Enter an address with a prefix (192.168.1.130/26) or a mask (192.168.1.130 255.255.255.192). The results update as you type; use the prefix menu to try other sizes.
- To plan subnets, open Split / VLSM, enter the parent network and either a number of subnets, the hosts per subnet, or one line per subnet with its name and host count.
- For IPv6, open the IPv6 tab and enter an address in any form, with an optional /prefix.
- To check for conflicts, open Overlap check and paste one CIDR per line.
- Copy the summary or download the subnet plan as CSV.
Frequently asked questions
How many usable hosts are in a /24, /25, /26…?
Usable hosts = 2^(32 − prefix) − 2, because the first address is the network and the last is the broadcast. /24: 254, /25: 126, /26: 62, /27: 30, /28: 14, /29: 6, /30: 2. /31 has 2 usable addresses on point-to-point links (RFC 3021) and /32 is one host. Cloud providers reserve more: AWS keeps 5 addresses per subnet and Azure 5, so an AWS /24 has 251 usable addresses.
What is a wildcard mask?
The bitwise inverse of the subnet mask: 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF network statements use wildcard masks, where a 0 bit means “must match” and a 1 bit means “any value”. For a contiguous mask, the wildcard is simply 255 minus each octet.
Which IP ranges are private?
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16 for private networks. Also not publicly routable: 100.64.0.0/10 for carrier-grade NAT (RFC 6598), 127.0.0.0/8 loopback, 169.254.0.0/16 link-local, and the documentation ranges 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24. For IPv6, fc00::/7 (in practice fd00::/8) is the private unique-local range.
What is VLSM?
Variable Length Subnet Masking means dividing a network into subnets of different sizes instead of equal ones, so a 100-host LAN gets a /25 and a router link gets a /30 from the same block. The standard method, used here, sorts the requests from largest to smallest and gives each the smallest power-of-two block that fits, so every subnet stays aligned on its own boundary.
Why does a /31 have two usable hosts?
On a point-to-point link there are only two devices, so a network and a broadcast address are wasted space. RFC 3021 allows /31 subnets where both addresses are assigned to the two ends. Most routers and Linux support it, and it halves address use on links compared with a /30.
How big is an IPv6 /64, /56 or /48?
A /64 is the standard size of a single IPv6 subnet and holds 2^64 (about 18.4 quintillion) addresses; SLAAC requires exactly /64. Home connections typically get a /56 (256 subnets of /64) or a /64, and organisations a /48 (65,536 subnets of /64). You plan IPv6 by counting /64 subnets, not addresses.
IPv4 subnet cheat sheet
• /8 — 255.0.0.0 — 16,777,214 hosts
• /16 — 255.255.0.0 — 65,534 hosts
• /20 — 255.255.240.0 — 4,094 hosts
• /22 — 255.255.252.0 — 1,022 hosts
• /23 — 255.255.254.0 — 510 hosts
• /24 — 255.255.255.0 — 254 hosts
• /25 — 255.255.255.128 — 126 hosts
• /26 — 255.255.255.192 — 62 hosts
• /27 — 255.255.255.224 — 30 hosts
• /28 — 255.255.255.240 — 14 hosts
• /29 — 255.255.255.248 — 6 hosts
• /30 — 255.255.255.252 — 2 hosts
• /31 — 255.255.255.254 — 2 (point-to-point, RFC 3021)
• /32 — 255.255.255.255 — 1 (single host)
Planning cloud and VPN address space
Most network trouble in cloud projects comes from overlapping ranges, discovered only when two networks need to be peered or joined over VPN. Before creating a VPC or VNet, list every range it may ever have to reach: other VPCs, on-premises offices, VPN client pools, Kubernetes pod and service CIDRs, and Docker’s default bridge (172.17.0.0/16). Run them through the overlap checker, then pick a block that collides with none.
Avoid 192.168.0.0/24 and 192.168.1.0/24 for anything remote users connect to over VPN, because most home routers use them. Give each environment its own large block (for example a /16 per region from 10.0.0.0/8) and split it with VLSM, so you can add subnets later without renumbering.
Reading IPv6 addresses
An IPv6 address is 128 bits written as eight groups of four hex digits. RFC 5952 defines one canonical short form: lowercase letters, leading zeros dropped in each group, and the longest run of two or more all-zero groups replaced by “::” (the first run if there is a tie; a single zero group is never shortened). So 2001:0db8:0000:0000:0000:ff00:0042:8329 is written 2001:db8::ff00:42:8329. Use the canonical form in logs, documentation and firewall rules so the same address always compares equal as text.
Related free tools
- Chmod Calculator — Tick read, write and execute boxes to get the octal mode and chmod command, or decode 755, 644 and rwxr-xr-x.
- Docker Run ⇄ Compose — Turn a docker run command into a docker-compose.yml service, or a Compose service back into docker run.
- User Agent Parser — See your own user agent and client hints, or parse any UA string into browser, engine, OS, device and CPU. Bulk mode with CSV.
- Regex Tester — Test a regular expression against sample text with live match highlighting, capture groups and replace preview. Free, in your browser.