ip5.io

Subnet calculator

Which addresses belong to a network?

A network like 192.168.1.0/24 is a block of addresses. Enter one to see which addresses your devices can use, how many there are, and what the number after the slash means.

DOCUMENTATION
203.0.0.0/8

16,777,214 addresses for devices: 203.0.0.1 to 203.255.255.254.

203.0.0.0 names the network and 203.255.255.255 reaches every device at once. Reserved for examples in documentation, like this one.

203.0.0.0203.0.0.1 – 203.255.255.254203.255.255.255
network203.0.113.8 is herebroadcast

What /8 means

An IPv4 address has 32 bits. The first 8 name the network and stay the same for every device in it; the last 24 number the devices.

11001011
203
00000000
0
01110001
113
00001000
8
Network part: 8 bitsDevice part: 24 bits
/8 · 255.0.0.0 · 16,777,214 device addresses

Details

Network
203.0.0.0/8
Subnet mask
255.0.0.0The same size, written as an address.
Wildcard mask
0.255.255.255The mask flipped, used in router and firewall rules.
First device address
203.0.0.1
Last device address
203.255.255.254
Broadcast
203.255.255.255
Addresses in total
16,777,216
Usable for devices
16,777,214
Type
Documentation

Common sizes

Click a row to try it with your address.

SizeMaskDevicesTypical use
/32255.255.255.255One addressa single device or server
/31255.255.255.254Two addressesa link between two routers
/30255.255.255.252Two addressesa small link with room to spare
/29255.255.255.2486a small office's public block
/28255.255.255.24014a small office
/27255.255.255.22430a floor of an office
/26255.255.255.19262a guest Wi-Fi
/25255.255.255.128126half a home network
/24255.255.255.0254a typical home network
/23255.255.254.0510a bigger home or school network
/22255.255.252.01,022a company building
/16255.255.0.065,534a large company or campus
/8255.0.0.016,777,214a whole provider or very large company

Same address in other formats

One address can be written many ways. Browsers and most programs accept all of them, which is why odd-looking links like http://3232235777/ still open a site.

Usual203.0.113.8
One number3405803784
Hexadecimal0xCB007108
Binary11001011.00000000.01110001.00001000
Inside IPv6::ffff:203.0.113.8
Inside IPv6 (hex)::ffff:cb00:7108
Reverse DNS name8.113.0.203.in-addr.arpa

What a subnet calculator can't tell

Which addresses are in useIt shows which addresses belong to the network, not which devices are connected. Your router's device list shows that.
Your router's settingsThe size is set on the router. Most homes use /24, but its settings page says for sure. See how to find your router's IP.
Who owns a public blockThe math is the same for any address. To see which company a public address belongs to, use the IP lookup.
From the terminal
curl ip5.io/subnet-calculator/192.168.1.0/24
curl "ip5.io/subnet-calculator/2001:db8::/48?format=json"

Worked out in your browser. Nothing you enter is stored.

5 questions

Q1What does /24 mean?

An IPv4 address has 32 bits. The number after the slash says how many of them name the network; the rest number the devices in it. /24 leaves 8 bits for devices: 256 addresses, 254 of them usable.

Q2What is a subnet mask?

The same thing written as an address. 255.255.255.0 is /24: the 255s cover the network part, the 0 the device part. Older settings screens ask for the mask, newer ones for the number after the slash.

Q3Why can't devices use the first and last address?

The first one names the network itself, and the last one is the broadcast address, which reaches every device at once. The exceptions are /31, used for links between two routers, and /32, a single address. IPv6 has no broadcast, so it uses every address.

Q4Why is my home network 192.168.something?

192.168.0.0/16, 10.0.0.0/8 and 172.16.0.0/12 are set aside for private networks. Every home can use them, because they never appear on the internet: your router shares one public address for all of them.

Q5Are two devices on the same network?

Only if their network parts match. With /24, 192.168.1.20 and 192.168.1.200 are on the same network; 192.168.1.20 and 192.168.2.20 are not, and need a router between them.