IP Subnet Calculator: IPv4 CIDR and Subnet Mask Lookup
Use this IP subnet calculator to turn an IPv4 address and a CIDR prefix or subnet mask into the network address, broadcast address, usable host range, wildcard mask and binary form. IPv4 only.
By Troopus · Updated: October 28, 2026
- 1 input only
- CIDR or mask
- Live result
- 100% private
IPv4 subnet and CIDR calculator
For information only. Check results before changing a live network. Everything runs in your browser and nothing is sent anywhere.
How do you use an IP subnet calculator?
Type an IPv4 address followed by a CIDR prefix or a subnet mask, such as 192.168.1.10/24 or 192.168.1.10 255.255.255.0, and the calculator shows the network address, broadcast address, usable host range and wildcard mask. It handles IPv4 only. IPv6 is not supported.
The field starts with 192.168.1.10/24, so you can see a full result before typing. All of these formats work:
- 192.168.1.10/24
- 192.168.1.10 /24
- 192.168.1.10 255.255.255.0
- 192.168.1.10/255.255.255.0
This subnet calculator is also a CIDR calculator and a subnet mask calculator: enter a mask and it returns the prefix, or enter a prefix and it returns the mask. If the mask is not made of ones followed by zeros, it will tell you.
What is CIDR notation and a subnet mask?
CIDR notation writes an IPv4 address followed by a slash and the number of leading bits that identify the network, from 0 to 32. A /24 means the first 24 bits are the network and the last 8 are for hosts. The matching subnet mask is 255.255.255.0.
RFC 4632 defines CIDR prefixes this way: the prefix length is a decimal value between 0 and 32 that describes the number of significant bits, and 192.168.99.0/24 has 24 leading ones and 8 trailing zeros. A subnet mask is the same idea written as four numbers. RFC 950 describes the mask as 32 bits that mark which part of the address is the network and subnet. It also recommends that those bits be contiguous, and modern equipment expects it.
The wildcard mask is the mask with every bit flipped. For 255.255.255.0 it is 0.0.0.255. Access control lists on some routers use wildcard masks.
How are the network and broadcast addresses calculated?
The network address is the IP address AND the subnet mask, and the broadcast address is the network address with all host bits set to 1. Usable hosts are 2^(32 - prefix) minus 2. For 192.168.1.10/24 that gives network 192.168.1.0, broadcast 192.168.1.255 and 254 usable hosts.
Worked example for 192.168.1.10/24:
- Mask: 24 ones = 255.255.255.0
- Network = 192.168.1.10 AND 255.255.255.0 = 192.168.1.0
- Broadcast = 192.168.1.0 with the last 8 bits set = 192.168.1.255
- First host = 192.168.1.1 and last host = 192.168.1.254
- Usable hosts = 2^8 - 2 = 254
The two subtracted addresses are the all-zeros host value (the network address) and the all-ones host value (the broadcast address). RFC 950 reserves these special values. Two prefixes are exceptions. A /31 has two addresses and, under RFC 3021, both are usable on a point-to-point link with no broadcast. A /32 is a single address, so this tool shows 1 usable host.
The legacy IP class is shown from the first octet: Class A starts with bit 0 (0 to 127), Class B with 10 (128 to 191), Class C with 110 (192 to 223). RFC 791 defines these three. Class D is 224 to 239 (multicast, RFC 1112) and the rest is reserved. CIDR replaced classful routing, so the class is for reference only.
What is a CIDR cheat sheet for common prefixes?
A /24 has 256 addresses and 254 usable hosts, a /16 has 65,536 and 65,534, and a /8 has 16,777,216 and 16,777,214. Each extra prefix bit halves the block. The table lists the mask, wildcard, total addresses and usable hosts for every prefix from /8 to /32.
| CIDR | Subnet mask | Wildcard mask | Total 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 networks are set aside by RFC 1918 as 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The calculator labels an address when it falls inside one of them.
Does this IP subnet calculator support IPv6?
No. This subnet calculator works with IPv4 addresses only. IPv6 uses 128-bit addresses and a different convention, and it does not have a broadcast address. If you enter an IPv6 address, the tool will say it is not a valid IPv4 address.
Keeping the tool to IPv4 keeps it to one input and one clear answer. Nothing you type leaves your browser.
Frequently asked questions
What is the network address of 192.168.1.10/24?
The network address is 192.168.1.0. It is the IP address combined with the subnet mask using a bitwise AND. The broadcast address is 192.168.1.255, and usable hosts run from 192.168.1.1 to 192.168.1.254.
How many hosts are in a /24?
A /24 has 256 addresses in total and 254 usable hosts. Two addresses are reserved: the network address with all host bits zero and the broadcast address with all host bits one.
What is the subnet mask for /24?
The subnet mask for /24 is 255.255.255.0. The first 24 bits are ones and the last 8 are zeros, which leaves 8 host bits. The wildcard mask is the opposite, 0.0.0.255, used in some router access lists.
How do I convert a subnet mask to CIDR with a CIDR calculator?
Count the one bits in the mask. For 255.255.240.0 that is 8 + 8 + 4 = 20, so the prefix is /20. Paste the mask after the address and the calculator shows the prefix.
What is a wildcard mask?
A wildcard mask is the subnet mask with every bit inverted. It is used in some router access lists. For a /26 the mask is 255.255.255.192 and the wildcard mask is 0.0.0.63.
Why does a /31 show two usable hosts?
RFC 3021 allows a /31 on point-to-point links, where both addresses are used as hosts and no broadcast address exists. Older equipment may not support it, so check your devices.
What are the private IP ranges?
RFC 1918 reserves 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255 and 192.168.0.0 to 192.168.255.255 for private networks. The calculator labels addresses in those blocks as private, so you can tell at a glance whether a network is meant for internal use only.
How do I use a subnet mask calculator for a /26 network?
Enter an address and a mask such as 192.168.1.10 255.255.255.192. The subnet mask calculator converts it to /26, then shows a network of 192.168.1.0, 62 usable hosts, a broadcast address of 192.168.1.63 and the wildcard mask 0.0.0.63.