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
2001:db8::/128

Just one address: 2001:db8::.

Reserved for examples in documentation, like this one.

2001:db8::
2001:db8:: is here

What /128 means

An IPv6 address has 128 bits, written as 32 hex digits. The first 128 bits name the network; the last 0 number the devices.

2001
0db8
0000
0000
0000
0000
0000
0000
Network part: 128 bitsDevice part: 0 bits
/128 · 1 device addresses

Details

Network
2001:db8::/128
First device address
2001:db8::
Last device address
2001:db8::
Addresses in total
1
Usable for devices
1All of them: IPv6 keeps none aside.
Type
Documentation

Common sizes

Click a row to try it with your address.

SizeDevicesTypical use
/128One addressa single device
/127Two addressesa link between two routers
/64264one network, like a home Wi-Fi
/60268what some providers give a home
/56272what many providers give a home
/48280a company or site
/32296a provider

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.

Short2001:db8::
Full2001:0db8:0000:0000:0000:0000:0000:0000
One number42540766411282592856903984951653826560
Reverse DNS name0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.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.