- Home
- Web Tools
- Network Tools
- IP Subnet Calculator — CIDR & Subnet Mask
IP Subnet Calculator — CIDR & Subnet Mask
Section titled “IP Subnet Calculator — CIDR & Subnet Mask”Enter an IPv4 address and choose a CIDR prefix to find its network range and usable host count.
Enter an IPv4 address to calculate automatically. Example: 192.168.100.10
- IP Address
- 192.168.100.0
- CIDR Notation
- /24 (255.255.255.0)
- Network Address
- 192.168.100.0
- Usable Host IP Range
- 192.168.100.1 - 192.168.100.254
- Broadcast Address
- 192.168.100.255
- Total Number of Addresses
- 256
- Number of Usable Hosts
- 254
- Subnet Mask
- 255.255.255.0
- Wildcard Mask
- 0.0.0.255
- Binary Subnet Mask
- 11111111.11111111.11111111.00000000
- IP Class
- C
- IP Type
- Private
/31 provides two addresses; /32 provides one. Neither has a broadcast address.
How to use the calculator
Section titled “How to use the calculator”- Enter a dotted-decimal IPv4 address, such as
192.168.100.10. - Choose a subnet mask or CIDR prefix.
- Read the updated results immediately, or use a row’s Copy button to copy its value.
Use an IPv4 address with each number between 0 and 255. Do not add extra leading zeros, as in 192.168.001.1.
What is CIDR?
Section titled “What is CIDR?”In /24, the first 24 bits identify the network, leaving 256 addresses in the block. A larger number after the slash means a smaller network range.
Understanding subnet masks
Section titled “Understanding subnet masks”A subnet mask identifies the network portion of an IP address. For /24, the mask is 255.255.255.0 and the wildcard mask is 0.0.0.255.
Network and broadcast addresses
Section titled “Network and broadcast addresses”Usually, the first address identifies the network and the last is the broadcast address. For 192.168.100.10/24, these are 192.168.100.0 and 192.168.100.255.
Calculating usable hosts
Section titled “Calculating usable hosts”The usual formula is 2^(32 − prefix length) − 2, giving 254 hosts for /24. A /31 provides two point-to-point endpoints, and a /32 represents one address. Counts may include reserved or other addresses that cannot be assigned to devices.
What is an IP class?
Section titled “What is an IP class?”An IPv4 address has 32 bits. Its leading bits place it in one of five historical classes, A–E.
| Class | Leading bits | Address range |
|---|---|---|
| A | 0 |
0.0.0.0 – 127.255.255.255 |
| B | 10 |
128.0.0.0 – 191.255.255.255 |
| C | 110 |
192.0.0.0 – 223.255.255.255 |
| D (IP multicast) | 1110 |
224.0.0.0 – 239.255.255.255 |
| E (reserved for future or experimental use) | 1111 |
240.0.0.0 – 255.255.255.255 |
Today, network boundaries and host counts are determined by CIDR, rather than IP class. For example, 192.168.0.0/23 is valid even though its addresses fall within class C. It contains 512 addresses, usually supporting 510 hosts.
Class D is for multicast, and class E is reserved. The ranges also include special-purpose addresses, such as 127.0.0.0/8 for loopback and 255.255.255.255 for limited broadcast.
Private IP addresses and classes
Section titled “Private IP addresses and classes”The following private address ranges can be used within a LAN. They fall within the historical class A–C ranges.
| Historical class | Private address range | CIDR notation |
|---|---|---|
| A | 10.0.0.0 – 10.255.255.255 |
10.0.0.0/8 |
| B | 172.16.0.0 – 172.31.255.255 |
172.16.0.0/12 |
| C | 192.168.0.0 – 192.168.255.255 |
192.168.0.0/16 |
These are subsets of their respective classes; not every class B address, for example, is private. You can divide these ranges into smaller subnets, such as /24, for home or office networks. Private address definitions (RFC 1918)
What does IP Type mean?
Section titled “What does IP Type mean?”IP Type describes the purpose of the address you entered, such as private or loopback. It is separate from IP Class and does not indicate whether the address is reachable.
IPv4 Subnet Mask Reference Table
Section titled “IPv4 Subnet Mask Reference Table”| CIDR | Subnet Mask | Usable Hosts |
|---|---|---|
| /32 | 255.255.255.255 | 1 (single host) |
| /31 | 255.255.255.254 | 2 (point-to-point) |
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /27 | 255.255.255.224 | 30 |
| /26 | 255.255.255.192 | 62 |
| /25 | 255.255.255.128 | 126 |
| /24 | 255.255.255.0 | 254 |
| /23 | 255.255.254.0 | 510 |
| /22 | 255.255.252.0 | 1,022 |
| /21 | 255.255.248.0 | 2,046 |
| /20 | 255.255.240.0 | 4,094 |
| /19 | 255.255.224.0 | 8,190 |
| /18 | 255.255.192.0 | 16,382 |
| /17 | 255.255.128.0 | 32,766 |
| /16 | 255.255.0.0 | 65,534 |
| /15 | 255.254.0.0 | 131,070 |
| /14 | 255.252.0.0 | 262,142 |
| /13 | 255.248.0.0 | 524,286 |
| /12 | 255.240.0.0 | 1,048,574 |
| /11 | 255.224.0.0 | 2,097,150 |
| /10 | 255.192.0.0 | 4,194,302 |
| /9 | 255.128.0.0 | 8,388,606 |
| /8 | 255.0.0.0 | 16,777,214 |
| /7 | 254.0.0.0 | 33,554,430 |
| /6 | 252.0.0.0 | 67,108,862 |
| /5 | 248.0.0.0 | 134,217,726 |
| /4 | 240.0.0.0 | 268,435,454 |
| /3 | 224.0.0.0 | 536,870,910 |
| /2 | 192.0.0.0 | 1,073,741,822 |
| /1 | 128.0.0.0 | 2,147,483,646 |
| /0 | 0.0.0.0 | 4,294,967,294 |
/31 provides two addresses; /32 provides one. Neither has a broadcast address.