Subnet Calculator
Type an IPv4 or IPv6 address with a prefix, mask, wildcard or range. Network, broadcast, hosts, VLSM and summaries, worked out exactly Exact results in your browser; nothing is uploaded.
Calculate a subnet
For example 10.0.0.0/8, 10.0.0.0 255.0.0.0, 10.0.0.0 0.255.255.255, 10.0.0.5-10.0.0.20 or 2001:db8::/32. Several, separated by commas, are summarised.
IPv4 network
192.168.1.0/24
254 usable hosts · 192.168.1.1 – 192.168.1.254
- 192.168.1.10 is a host inside 192.168.1.0/24; the network starts at 192.168.1.0.
CIDR blocks
- Network address
- 192.168.1.0The first address of the block; it names the subnet and isn't given to a host. How it's worked out
- Broadcast address
- 192.168.1.255The last address: a packet sent here reaches every host in the subnet.
- Usable host range
- 192.168.1.1 – 192.168.1.254Everything between the network and broadcast addresses.
- Usable hosts
- 2542^8 − 2 = 254: all addresses minus the network and broadcast.
- Total addresses
- 256
- Subnet mask
- 255.255.255.0/24: 24 network bits, 8 host bits.
- CIDR notation
- 192.168.1.0/24
- Wildcard mask
- 0.0.0.255The mask inverted, as Cisco ACLs and OSPF network statements use it. Mask vs wildcard
- Address type
- Private (RFC 1918) Not routed on the internetPrivate address, the range most home routers use. It isn't routed on the internet; the router translates it (NAT) to your public address. (RFC 1918, 192.168.0.0/16) Private ranges
- IP address
- 192.168.1.10Address number 10 in this subnet (counting the network address as 0).
Binary and hex view, reverse DNS and more
Binary view (network bits · host bits)
The first 24 bits are the network part; the last 8 are the host part.
- Address class
- C192.0.0.0 to 223.255.255.255, default mask /24. Classes were replaced by CIDR in 1993; still asked in exams.
- Binary address
- 11000000.10101000.00000001.00001010
- Hex
- 0xC0A8010A
- Decimal (32-bit integer)
- 3232235786How databases and some APIs store an IPv4 address.
- Reverse DNS (PTR) name
- 10.1.168.192.in-addr.arpa
- Reverse DNS zone
- 1.168.192.in-addr.arpaOne zone: the block sits exactly on a /24 octet boundary.
- IPv4-mapped IPv6
- ::ffff:192.168.1.10The same address as dual-stack software writes it.
Split a network into equal subnets
4 subnets of /26. 62 usable hosts in each.
| # | Network | Usable range | Broadcast | Hosts |
|---|---|---|---|---|
| 1 | 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 | 62 |
| 2 | 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 | 62 |
| 3 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 | 62 |
| 4 | 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 | 62 |
VLSM calculator: subnets of different sizes
Uses 228 of 256 addresses (89.1%). Largest first, each on its own boundary.
| Subnet | Hosts needed | Network | Usable range | Broadcast | Mask | Usable | Spare |
|---|---|---|---|---|---|---|---|
| Staff | 100 | 192.168.1.0/25 | 192.168.1.1 – 192.168.1.126 | 192.168.1.127 | 255.255.255.128 | 126 | 26 |
| Guests | 50 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 | 255.255.255.192 | 62 | 12 |
| Servers | 25 | 192.168.1.192/27 | 192.168.1.193 – 192.168.1.222 | 192.168.1.223 | 255.255.255.224 | 30 | 5 |
| Router link | 2 | 192.168.1.224/30 | 192.168.1.225 – 192.168.1.226 | 192.168.1.227 | 255.255.255.252 | 2 | 0 |
Free space left
192.168.1.228/30, 192.168.1.232/29, 192.168.1.240/28
IP range to CIDR, and route summarisation
Fewest CIDR blocks covering exactly these addresses
- 192.168.0.0/22
- IPv4 summary
- 1 blockEverything merges into one route.
- IPv4 supernet
- 192.168.0.0/22The single smallest block holding them all, with nothing extra.
- IPv4 addresses covered
- 1,024
Is an IP address in a subnet?
Result
- 192.168.1.77Insideaddress 77 of the block
- 192.168.2.1Outside
- 192.168.1.128/25Inside
- 192.168.0.0/16Contains the whole network
IPv6 tools: EUI-64, compress and expand
EUI-64 address from a MAC address
- EUI-64 address
- 2001:db8::21a:2bff:fe3c:4d5e
- Link-local address
- fe80::21a:2bff:fe3c:4d5e
- How
- 00:1a:2b + ff:fe + 3c:4d:5e, then flip bit 7 of the first byte (00 → 02): interface ID 021a:2bff:fe3c:4d5e.
Compress or expand IPv6 addresses
- 2001:db8::ff00:42:83292001:0db8:0000:0000:0000:ff00:0042:8329
- fe80::202:b3ff:fe1e:8329fe80:0000:0000:0000:0202:b3ff:fe1e:8329
- ::ffff:192.0.2.1280000:0000:0000:0000:0000:ffff:c000:0280
Subnet cheat sheet: /0 to /32
| CIDR | Subnet mask | Wildcard | Addresses | Usable hosts | Size | Typical use |
|---|---|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 | 16,777,216 × /24 | Every IPv4 address (default route) |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 | 8,388,608 × /24 | |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 | 4,194,304 × /24 | |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 | 2,097,152 × /24 | |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 | 1,048,576 × /24 | |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 | 524,288 × /24 | |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 | 262,144 × /24 | |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 | 131,072 × /24 | |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 65,536 × /24 | Old class A; 10.0.0.0/8 is private |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 32,768 × /24 | |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 16,384 × /24 | 100.64.0.0/10 is CGNAT shared space |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 8,192 × /24 | |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 4,096 × /24 | 172.16.0.0/12 is private |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 2,048 × /24 | |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 1,024 × /24 | |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 512 × /24 | |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 256 × /24 | Old class B; 192.168.0.0/16 is private |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 128 × /24 | |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 64 × /24 | |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 32 × /24 | |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 16 × /24 | Big office or campus network |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 8 × /24 | |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 4 × /24 | Up to 1,022 hosts, e.g. a big Wi-Fi network |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 2 × /24 | Two /24s side by side |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 1 × /24 | Old class C; the typical LAN |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 1/2 of a /24 | Half a /24 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 1/4 of a /24 | Quarter of a /24 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 1/8 of a /24 | Small office or VLAN |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 1/16 of a /24 | Small server segment |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 1/32 of a /24 | Small block of public IPs from an ISP |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 1/64 of a /24 | Classic point-to-point link |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | 1/128 of a /24 | Point-to-point link (RFC 3021) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 1/256 of a /24 | One host: loopback, host route |
IPv6 prefix sizes
| Prefix | Addresses | /64 subnets | Typical use |
|---|---|---|---|
| /32 | 2^96 | 4,294,967,296 | A common size for a provider's allocation from a registry |
| /40 | 2^88 | 16,777,216 | A large organisation |
| /44 | 2^84 | 1,048,576 | Several sites |
| /48 | 2^80 | 65,536 | One organisation's site: 65,536 LANs |
| /52 | 2^76 | 4,096 | A department or a large building |
| /56 | 2^72 | 256 | What many providers give a home connection: 256 LANs |
| /60 | 2^68 | 16 | A smaller home allocation: 16 LANs |
| /64 | 2^64 | 1 | One LAN; SLAAC needs exactly this |
| /112 | 65,536 | — | Sometimes used for point-to-point links |
| /127 | 2 | — | Point-to-point link (RFC 6164) |
| /128 | 1 | — | One address: loopback, host route |
Usable hosts are addresses minus the network and broadcast addresses, except /31 (RFC 3021) and /32. Shaded rows fall on octet boundaries.
Why use this subnet calculator?
Subnetting is simple arithmetic on bits, and the mistakes are always the same ones: an off-by-one broadcast address, a mask that doesn't match the prefix, a VLSM block that doesn't start on its boundary. This calculator takes any way of writing a network (CIDR, a dotted mask, a Cisco wildcard, a range or a list) and gives every answer at once, with the working shown in binary. IPv6 uses the same exact BigInt maths, so a /48 or even a /0 is counted to the last address. It runs entirely in your browser, works offline once loaded, and never sends your addresses anywhere.
How to use it
- Type an address with a /prefix, a subnet mask or a wildcard, or a range such as 10.0.0.5-10.0.0.20. A bare address uses the prefix picker.
- Read the network, broadcast, host range and count; open Binary and hex view for the bits, reverse DNS and other forms. The arrows step to the neighbouring subnet.
- Use Split or VLSM to plan subnets and download them as CSV, or paste routes into summarise to merge them.
- Copy JSON or Share: the address lives in the page link, so a shared link opens the same result.
How to calculate a subnet by hand
Every IPv4 address is 32 bits. The prefix length says how many of them, counted from the left, name the network; the rest number the hosts inside it. Take 192.168.10.130/26:
- Mask. 26 one bits then 6 zero bits: 255.255.255.192.
- Block size. The interesting octet is the last one, and 256 − 192 = 64. Subnets start at .0, .64, .128 and .192.
- Network address. Round .130 down to a multiple of 64: 192.168.10.128.
- Broadcast address. One before the next block: 128 + 64 − 1 = 192.168.10.191.
- Hosts. Everything in between, 192.168.10.129 to 192.168.10.190: 2^6 − 2 = 62 usable addresses.
In binary the same steps are a bitwise AND: the network is the address AND the mask, and the broadcast is the network OR the inverted mask. The binary view in the calculator shows exactly that split, network bits in colour and host bits after them.
address 11000000.10101000.00001010.10|000010 192.168.10.130
mask 11111111.11111111.11111111.11|000000 255.255.255.192
network 11000000.10101000.00001010.10|000000 192.168.10.128
broadcast 11000000.10101000.00001010.10|111111 192.168.10.191Network address, broadcast address and usable hosts
A subnet's first address (all host bits 0) is its network address: it names the subnet in routing tables and isn't given to a device. The last (all host bits 1) is the broadcast address: a packet sent there reaches every host on the subnet. That's why an IPv4 /n subnet has 2^(32 − n) − 2 usable hosts: 254 in a /24, 62 in a /26, 2 in a /30.
- /31: two addresses and no broadcast. RFC 3021 lets point-to-point router links use both, saving half the addresses of a /30.
- /32: exactly one address, used for loopback interfaces and host routes.
- IPv6 has no broadcast address at all; multicast groups such as ff02::1 (all nodes on the link) replace it, so every address in an IPv6 block can be assigned.
Subnet mask, CIDR prefix and wildcard mask
They are three ways of writing the same boundary. The prefix counts the network bits (/20). The subnet mask writes those bits as ones (255.255.240.0). The wildcard mask inverts the mask, ones for the host bits (0.0.15.255), and is what Cisco access lists and OSPF network statements expect. To turn a mask into a wildcard, subtract each octet from 255: 255 − 240 = 15. A valid mask always has its ones first; 255.255.0.255 is not a mask, and the calculator says so.
| Prefix | Mask | Wildcard | Block size in the octet |
|---|---|---|---|
| /25 | 255.255.255.128 | 0.0.0.127 | 128 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 |
Private IP address ranges (RFC 1918)
Three blocks are reserved for private networks and are never routed on the public internet. Home routers, offices and cloud VPCs number their devices from them, and a router translates them to a public address on the way out (NAT).
| Block | Range | Addresses | Often seen |
|---|---|---|---|
| 10.0.0.0/8 | 10.0.0.0 – 10.255.255.255 | 16,777,216 | Companies, cloud networks, VPNs |
| 172.16.0.0/12 | 172.16.0.0 – 172.31.255.255 | 1,048,576 | Docker's default bridge networks, offices |
| 192.168.0.0/16 | 192.168.0.0 – 192.168.255.255 | 65,536 | Home routers (192.168.0.x, 192.168.1.x) |
Note the middle one: 172.16.0.0/12 stops at 172.31.255.255, so 172.32.0.1 is an ordinary public address. The calculator's address type row checks this for you.
What is 100.64.0.0/10? Carrier-grade NAT explained
RFC 6598 (2012) set aside 100.64.0.0/10, 100.64.0.0 to 100.127.255.255, as shared address space for carrier-grade NAT (CGNAT). Providers that don't have a public IPv4 address for every customer put a large NAT in their own network and number the customer side from this block. It isn't private space you should use at home: it exists so the provider's addresses can't clash with the 192.168.x.x or 10.x.x.x network behind your router.
CGNAT is common on mobile data and on many home broadband connections. To check yours, look at the WAN or internet address on your router's status page. If it starts with 100.64 to 100.127 (or doesn't match the public address websites see), you're behind CGNAT. The practical effects: port forwarding, hosting a game or camera server at home, and some peer-to-peer apps won't work from outside. The usual fixes are asking your provider for a public IPv4 address, or using IPv6, which needs no NAT.
Other special IPv4 ranges
| Block | Purpose | Defined in |
|---|---|---|
| 0.0.0.0/8 | "This network": source only, before a host knows its address | RFC 1122 |
| 127.0.0.0/8 | Loopback (127.0.0.1 is localhost) | RFC 1122 |
| 169.254.0.0/16 | Link-local, self-assigned when DHCP fails (APIPA) | RFC 3927 |
| 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | Documentation (TEST-NET-1, 2 and 3): safe for examples | RFC 5737 |
| 198.18.0.0/15 | Benchmarking network equipment | RFC 2544 |
| 224.0.0.0/4 | Multicast (old class D) | RFC 5771 |
| 240.0.0.0/4 | Reserved for future use (old class E) | RFC 1112 |
| 255.255.255.255/32 | Limited broadcast on the local segment | RFC 919, RFC 8190 |
The calculator classifies any address against the IANA IPv4 and IPv6 Special-Purpose Address Registries (RFC 6890 and the RFCs listed), picking the most specific block, so 192.0.0.5 shows as DS-Lite rather than the wider IETF protocol block.
VLSM step by step
VLSM (variable length subnet masking) gives each subnet only the space it needs. The VLSM calculator above starts with this classic example: 192.168.1.0/24 for staff (100 hosts), guests (50 hosts), servers (25 hosts), router link (2 hosts).
- Sort by size, largest first. Big blocks placed first never leave awkward gaps.
- Size each block. Add 2 for the network and broadcast addresses and round up to a power of two: 100 + 2 → 128 (/25), 50 + 2 → 64 (/26), 25 + 2 → 32 (/27), 2 + 2 → 4 (/30).
- Place them in order from the start of the network. Because every block is a power of two and the larger ones come first, each starts on its own boundary.
| Subnet | Needs | Block | Hosts | Broadcast |
|---|---|---|---|---|
| Staff | 100 | 192.168.1.0/25 | 192.168.1.1 – 192.168.1.126 | 192.168.1.127 |
| Guests | 50 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 |
| Servers | 25 | 192.168.1.192/27 | 192.168.1.193 – 192.168.1.222 | 192.168.1.223 |
| Router link | 2 | 192.168.1.224/30 | 192.168.1.225 – 192.168.1.226 | 192.168.1.227 |
What's left, 192.168.1.228/30, 192.168.1.232/29, 192.168.1.240/28, is free for later; the calculator lists it as the fewest possible blocks. Tick the /31 option to give two-host router links a /31 instead of a /30.
Route summarisation (supernetting)
Summarising replaces several routes with fewer, larger ones covering exactly the same addresses, which keeps routing tables short. 192.168.0.0/24 to 192.168.3.0/24 are four adjacent /24s that together fill 192.168.0.0/22, so they summarise to that one route. Two blocks only merge when they touch and the result lines up on a boundary: 192.168.1.0/24 and 192.168.2.0/24 are adjacent but don't form a /23, because a /23 must start on an even third octet.
When the routes don't fill a block exactly, the smallest single supernet still covers them all, but it also takes in addresses that weren't in the list. The calculator shows both: the exact summary, and the supernet with the number of extra addresses it would advertise.
IP range to CIDR
Firewalls and cloud security groups usually want CIDR blocks, while people think in ranges. To convert, start at the first address and take the largest block that begins there (a block of 2^k addresses must start on a multiple of 2^k) and doesn't pass the end; repeat from the next address. 10.0.0.5 to 10.0.0.20 is 16 addresses but needs five blocks: 10.0.0.5/32, 10.0.0.6/31, 10.0.0.8/29, 10.0.0.16/30 and 10.0.0.20/32. Any range needs at most 62 IPv4 blocks (254 for IPv6), and the calculator also offers the single smallest block if you can accept a few extra addresses.
IPv6 subnetting: /48, /56 and /64
IPv6 addresses are 128 bits written as eight groups of four hex digits. The usual plan splits them in two: the first 64 bits are the network (routing prefix plus subnet ID) and the last 64 are the interface ID. A LAN is always a /64, because SLAAC, the way most devices configure themselves, builds a 64-bit interface ID. Organisations are typically given a /48 (65,536 LANs) and home connections a /56 (256 LANs) or a /60 (16). Point-to-point links can use a /127 (RFC 6164).
Written forms follow RFC 5952: lowercase hex, leading zeros dropped in each group, and the longest run of two or more zero groups replaced by :: (the first one if two runs tie). So 2001:0db8:0000:0000:0000:ff00:0042:8329 becomes 2001:db8::ff00:42:8329. The tools above compress and expand addresses in bulk.
IPv6 address types
| Prefix | Type | Defined in |
|---|---|---|
| 2000::/3 | Global unicast: routable internet addresses | RFC 4291 |
| fc00::/7 | Unique local (ULA), IPv6's private range; use fd00::/8 with a random ID | RFC 4193 |
| fe80::/10 | Link-local, on every interface, valid on one link only | RFC 4291 |
| ff00::/8 | Multicast (replaces broadcast) | RFC 4291 |
| ::1/128, ::/128 | Loopback and unspecified | RFC 4291 |
| 2001:db8::/32, 3fff::/20 | Documentation | RFC 3849, RFC 9637 |
| ::ffff:0:0/96 | IPv4-mapped addresses | RFC 4291 |
| 64:ff9b::/96 | NAT64 well-known prefix | RFC 6052 |
| 2002::/16, 2001::/32 | 6to4 and Teredo tunnelling | RFC 3056, RFC 4380 |
EUI-64 and IPv6 privacy addresses
Modified EUI-64 (RFC 4291, appendix A) turns a 48-bit MAC address into a 64-bit interface ID: split the MAC in half, insert ff:fe in the middle, and flip the seventh bit of the first byte (the universal/local bit). 00:1a:2b:3c:4d:5e becomes 021a:2bff:fe3c:4d5e, so with the prefix 2001:db8::/64 the address is 2001:db8::21a:2bff:fe3c:4d5e. The calculator spots that pattern in any address you type and shows the MAC it came from.
Because an EUI-64 address carries the same hardware ID on every network, it lets sites follow a device around. Most operating systems now use stable random interface IDs for their main address (RFC 7217) and rotating temporary addresses for outgoing connections (RFC 8981) instead; you still see EUI-64 on routers, servers and older devices.
Reverse DNS: in-addr.arpa and ip6.arpa
A PTR record maps an address back to a name. For IPv4 the octets are reversed under in-addr.arpa (192.168.1.10 → 10.1.168.192.in-addr.arpa) and zones are cut at octet boundaries, so a /23 needs two /24 zones and anything smaller than a /24 is delegated from its /24 with RFC 2317 names. For IPv6 every hex digit (nibble) becomes a label under ip6.arpa, last digit first, and zones are cut on 4-bit boundaries. The calculator writes both names and lists the zones a block needs.
More network and developer tools
Convert masks and addresses between binary, hex and decimal with the number base converter. See which browser, operating system and device a request really comes from with What Is My User Agent?, test an API endpoint with the cURL command builder, match addresses in logs with the regex tester, turn log timestamps into dates with the Unix timestamp converter, and percent-encode IPv6 zone IDs in URLs with the URL encoder.
Frequently asked questions
How do I calculate a subnet?
Turn the prefix into a mask, find the block size and round the address down to it. For 192.168.10.130/26 the mask is 255.255.255.192, so the block size in the last octet is 256 − 192 = 64. Subnets start at .0, .64, .128 and .192, and .130 falls in the one starting at .128: the network is 192.168.10.128, the broadcast is 192.168.10.191 (one before the next block), and the hosts are .129 to .190, 62 in all (2^6 − 2). Type the address into the calculator to check your working.
How many hosts are in a /24 subnet?
254 usable hosts out of 256 addresses. A /24 leaves 8 host bits, so there are 2^8 = 256 addresses, and the first (the network address) and the last (the broadcast address) can't be given to devices. In general an IPv4 /n subnet has 2^(32 − n) − 2 usable hosts: a /25 has 126, a /26 62, a /27 30, a /28 14, a /29 6 and a /30 2.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) writes a network as its first address plus the number of network bits after a slash. 192.168.1.0/24 means the first 24 bits identify the network and the last 8 identify hosts. CIDR replaced the fixed class A, B and C sizes in 1993 (RFC 1519, today RFC 4632), so a network can be any power-of-two size.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask has 1 bits for the network part (255.255.255.0 for a /24); a wildcard mask is the same mask inverted, with 1 bits for the host part (0.0.0.255). Interfaces and routing tables use subnet masks, while Cisco access lists and OSPF network statements use wildcards. To convert either way, subtract each octet from 255. The calculator accepts both after an address.
What are the private IP address ranges?
RFC 1918 reserves three ranges for private networks: 10.0.0.0/8 (10.0.0.0 to 10.255.255.255), 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16 (192.168.0.0 to 192.168.255.255). They're never routed on the public internet; a router or firewall translates them with NAT. 100.64.0.0/10 is a separate shared range for carrier-grade NAT, and 169.254.0.0/16 is link-local.
What is 100.64.0.0/10?
It's the shared address space for carrier-grade NAT (CGNAT), set aside by RFC 6598 in 2012. Internet providers short of public IPv4 addresses number the link between their NAT equipment and customers' routers from it. If your router's WAN address is between 100.64.0.0 and 100.127.255.255, you're behind CGNAT: you share a public address with other customers, so port forwarding and hosting a server at home won't work without your provider's help or IPv6.
What is VLSM?
Variable Length Subnet Masking: splitting a network into subnets of different sizes, each just big enough, instead of equal parts. Sort the needs from largest to smallest, give each the smallest block that fits (hosts plus 2, rounded up to a power of two), and place the blocks one after another from the start of the network so each lands on its own boundary. The VLSM calculator on this page does exactly that and lists the free space left over.
How do I convert an IP range to CIDR?
Start at the first address and repeatedly take the largest block that begins there, is aligned to its own size and doesn't run past the end. 10.0.0.5 to 10.0.0.20 becomes 10.0.0.5/32, 10.0.0.6/31, 10.0.0.8/29, 10.0.0.16/30 and 10.0.0.20/32. Paste a range such as 10.0.0.5-10.0.0.20 into the calculator to get the exact blocks and the smallest single block that covers it.
What is route summarisation (supernetting)?
Replacing several routes with fewer, larger ones that cover the same addresses. 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24 summarise to 192.168.0.0/22, because together they fill that block exactly. Blocks only merge when they touch and line up on a boundary; the calculator also shows the smallest single supernet and how many extra addresses it would take in.
How many /64 subnets are in a /48?
65,536. Each extra prefix bit halves a block, so a /48 holds 2^(64 − 48) = 2^16 = 65,536 /64s, a /56 holds 256 and a /60 holds 16. A /64 is the standard size for one IPv6 LAN, because SLAAC builds 64-bit interface IDs, and a single /64 has 2^64 (about 18.4 quintillion) addresses.
Why does a /31 have two usable addresses?
A /31 has only two addresses, so reserving a network and a broadcast address would leave none. RFC 3021 lets a point-to-point link between two routers use both, because a link with exactly two ends needs neither. Most current routers support it; a /30, with two usable addresses out of four, is the traditional choice.
What is the broadcast address of a subnet?
The last address in the block, with every host bit set to 1. For 192.168.1.0/24 it's 192.168.1.255, and for 10.0.0.0/22 it's 10.0.3.255. A packet sent to it reaches every host on that subnet. IPv6 has no broadcast addresses; multicast groups such as ff02::1 (all nodes on the link) do that job.
Related tools
More free, private, browser-based utilities — no upload, no sign-up.