IP Subnet Calculator
Your data never leaves your browserEnter an IP address with a prefix or subnet mask to get its network, broadcast and host range. IPv4 and IPv6.
- IP address
- 192.168.1.10
- Network address
- 192.168.1.0/24
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Broadcast address
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
- Address type
- Private (RFC 1918)
- IP class
- C
- Hex
- 0xC0A8010A
- Integer
- 3232235786
- Reverse DNS (PTR)
- 10.1.168.192.in-addr.arpa
Binary. The first 24 bits are the network, the remaining 8 identify the host.
Share this tool
Found it useful? Help a fellow developer discover it.
How the subnet calculator works
An IPv4 address is 32 bits. A subnet mask splits those bits in two: the bits under the 1s of the mask name the network, and the bits under the 0s name a host on that network. In 192.168.1.10/24, the /24 means the first 24 bits are the network, which is the same as the mask 255.255.255.0. That leaves 8 host bits, or 256 addresses from 192.168.1.0 to 192.168.1.255.
The subnet calculator does that bit math for you. The network address is the IP with every host bit set to 0, and the broadcast address is the IP with every host bit set to 1. Neither can be given to a device, so a /24 has 254 usable hosts. The wildcard mask is the subnet mask inverted, the form Cisco ACLs and OSPF network statements expect. Type a mask such as 10.0.0.1 255.255.240.0 instead of a prefix and the calculator converts it, and it reads IPv6 addresses like 2001:db8::/48 as well.
Subnet mask cheat sheet
Every IPv4 prefix from /8 to /32 with its subnet mask, wildcard mask and size. Each step down halves the number of addresses.
| CIDR | Subnet mask | Wildcard mask | Addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /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 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Private and reserved IPv4 ranges
These ranges are never routed on the public internet. The calculator labels any address that falls in one of them.
| Range | Addresses | Used for |
|---|---|---|
| 10.0.0.0/8 | 16,777,216 | Large private networks, cloud VPCs |
| 172.16.0.0/12 | 1,048,576 | Private networks, Docker's default bridge pool |
| 192.168.0.0/16 | 65,536 | Home and small office routers |
| 100.64.0.0/10 | 4,194,304 | Carrier-grade NAT, Tailscale |
| 169.254.0.0/16 | 65,536 | Link-local, self-assigned when DHCP fails |
| 127.0.0.0/8 | 16,777,216 | Loopback (localhost) |
How to use
- Type an address with its prefix, like
10.20.30.40/20, or with a subnet mask, like10.20.30.40 255.255.240.0. - Or type just the address and pick the prefix from the list. The list shows the matching subnet mask for each prefix.
- Read the network, broadcast and host range from the results. Click Copy on any row, or Copy All for the whole set.
- To plan smaller networks, choose a size under Split into. The table lists every subnet with its host range, and Copy list copies the CIDR blocks one per line.
Frequently Asked Questions
How do I calculate a subnet mask from a prefix?
Write the prefix length as that many 1 bits followed by 0 bits up to 32, then read each group of 8 bits as a number. /26 is 11111111.11111111.11111111.11000000, which is 255.255.255.192. The cheat sheet above lists every mask from /8 to /32.
How many usable hosts are in a /24?
254. A /24 has 256 addresses, and the first (the network address) and the last (the broadcast address) cannot be assigned to devices. In general a subnet has 2^(32 − prefix) − 2 usable hosts. The exceptions are /31, where both addresses are usable on a point-to-point link, and /32, which is a single host.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) writes a network as an address followed by a slash and the number of network bits, as in 10.0.0.0/8. It replaced the old class A, B and C system in 1993, so a network can be any size that is a power of two rather than only /8, /16 or /24.
What is a wildcard mask?
A subnet mask with every bit flipped. The wildcard for 255.255.255.0 is 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". You can type a wildcard mask into the calculator and it will work out the prefix.
How do I split a network into smaller subnets?
Each extra prefix bit halves the subnet and doubles the count. A /24 splits into two /25s, four /26s or eight /27s. Pick the size under "Split into" and the calculator lists every subnet with its host range and broadcast address, ready to copy into a plan or an IaC file.
Does it work with IPv6?
Yes. Enter an address such as 2001:db8:abcd::/48 to get the network, the first and last address, and how many /64 subnets it holds. IPv6 has no broadcast address, and a /64 is the standard size for a single LAN, so a /48 site allocation gives you 65,536 of them.
Related Tools
MAC Address Lookup
Find the vendor of any MAC address or OUI from the IEEE registry. Bulk lookup from arp output, randomized address detection, and every notation.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
HTTP Status Codes
Complete HTTP status code reference with descriptions. Search and filter all 1xx, 2xx, 3xx, 4xx, and 5xx codes.
Cron Expression Builder
Build and validate cron expressions with a human-readable description.