192.168.1.0/24, and works out the network that address belongs to. It shows the network address, the subnet mask, the wildcard mask, the broadcast address, the first and last addresses a device can use, and how many addresses the network holds.
10.0.0.0/8 can be entered like any other.
How to use the calculator
Type an IPv4 address, a slash and a prefix length into the field, for example 192.168.1.0/24.Click Calculate. Read the rows of the result. Network and Broadcast mark the two ends of the range, and the usable addresses lie between them. To keep the result, open "View as JSON" under the rows, or use Copy JSON and Download JSON.
192.168.1.57/24 and 192.168.1.0/24 both report the network 192.168.1.0/24. That helps when all you have is the address and mask of one device.
255.255.255.0 stands in its place, the page shows "Use IPv4 CIDR notation, for example 192.168.1.0/24."
How to read the result
| Row | What it shows | Value for 192.168.1.0/24 |
|---|---|---|
192.168.1.0/24 | ||
255.255.255.0 | ||
0.0.0.255 | ||
192.168.1.255 | ||
192.168.1.1 | ||
192.168.1.254 | ||
11000000.10101000.00000001.00000000 |
192.168.1.57/24 and it shows the bits of 192.168.1.57.
/31 has two addresses and both are counted as usable. A /32 is a single address.
An IPv4 address is a 32-bit number
| Octet | Sum of bit values | Binary |
|---|---|---|
11000000 | ||
10101000 | ||
00000001 | ||
01001101 | ||
11111111 |
192.168.1.0 is 11000000 10101000 00000001 00000000. The same 32 bits can also be read as one whole number, which is what IPv4 to Decimal shows.
What the prefix length and the mask mean
192.168.1.0/24 the first 24 bits are the network part and the remaining 8 bits are the host part.
/24 mask is 24 ones followed by 8 zeros, which reads as 255.255.255.0 in dotted form. Many settings screens ask for the mask, while documentation and routing tables usually give the prefix.
| Network bits in the octet | Binary | Mask octet |
|---|---|---|
00000000 | ||
10000000 | ||
11000000 | ||
11100000 | ||
11110000 | ||
11111000 | ||
11111100 | ||
11111110 | ||
11111111 |
255.255.240.0 is 8 + 8 + 4 + 0, so it is a /20.
A worked example in binary
203.0.113.77/26. The 26-bit prefix covers the first three octets completely, so only the last octet needs any work. Its first 2 bits belong to the network and its last 6 bits belong to the host.
| Value | Last octet in binary | Decimal |
|---|---|---|
01001101 | ||
11000000 | ||
01000000 | ||
00111111 | ||
01111111 |
01000000, so the network is 203.0.113.64/26.
01111111, or 203.0.113.127. The usable addresses are everything in between: 203.0.113.65 to 203.0.113.126. Six host bits make 64 addresses, and 62 are left once the network and broadcast addresses are taken out.
10.20.30.40/20 it falls inside the third octet. The number 30 is 00011110, the mask octet is 11110000 (240), and the AND of the two is 00010000, which is 16. The network is 10.20.16.0/20 and the broadcast address is 10.20.31.255, with 4,096 addresses in total.
Wildcard masks and where they are used
255.255.255.192 that gives 0.0.0.63.
203.0.113.64 0.0.0.63 covers the same 64 addresses as 203.0.113.64/26.
The private address ranges
| Block | Range | Addresses |
|---|---|---|
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 | |
192.168.0.0/16 | 192.168.0.0 to 192.168.255.255 |
/12 prefix ends inside the second octet, so it covers 172.16 through 172.31 and nothing else. An address such as 172.32.0.1 is a public address.
192.168.1.x addresses is using one /24 out of the 256 that fit in 192.168.0.0/16.
Questions this calculation settles
Two devices on the same cable or Wi-Fi cannot reach each other. Enter each address with its prefix. If the Network rows differ, the devices are in different networks and need a router, or a corrected mask, to talk. You were given a mask and need the prefix, or the other way round. Enter any address with the prefix you think is right and compare the Subnet mask row. You need the range that a firewall rule or an allow list covers. The Network row is the block to enter, and the Network and Broadcast rows show where it starts and ends. An address ending in .0or.255looks wrong. In a network larger than a/24it can be an ordinary host address.10.20.17.0sits in the middle of10.20.16.0/20and can be assigned to a device.