ip
ipku.in

IPv4 Subnet Calculator

Enter an IP with a CIDR prefix or a subnet mask to see its network, broadcast, host range, and host count. You can also split the network into smaller subnets.

$ ipcalc
private IP (RFC 1918)172.16.5.4/20
network172.16.0.0/20
broadcast172.16.15.255
first host172.16.0.1
last host172.16.15.254
subnet mask255.255.240.0
wildcard0.0.15.255
addresses4,096
usable hosts4,094
classB
ipcalc 172.16.5.4/20
address10101100.00010000.00000101.00000100
subnet mask11111111.11111111.11110000.00000000
network10101100.00010000.00000000.00000000
broadcast10101100.00010000.00001111.11111111
green = network part, grey = host part
hex0xac100504
decimal2886731012
reverse dns4.5.16.172.in-addr.arpa
ipv4-mapped::ffff:ac10:504

/20 split into /25 · 32 subnets

close ×
#networkhost rangebroadcast
1172.16.0.0/25172.16.0.1 – 172.16.0.126172.16.0.127
2172.16.0.128/25172.16.0.129 – 172.16.0.254172.16.0.255
3172.16.1.0/25172.16.1.1 – 172.16.1.126172.16.1.127
4172.16.1.128/25172.16.1.129 – 172.16.1.254172.16.1.255
5172.16.2.0/25172.16.2.1 – 172.16.2.126172.16.2.127
6172.16.2.128/25172.16.2.129 – 172.16.2.254172.16.2.255
7172.16.3.0/25172.16.3.1 – 172.16.3.126172.16.3.127
8172.16.3.128/25172.16.3.129 – 172.16.3.254172.16.3.255
9172.16.4.0/25172.16.4.1 – 172.16.4.126172.16.4.127
10172.16.4.128/25172.16.4.129 – 172.16.4.254172.16.4.255
11172.16.5.0/25172.16.5.1 – 172.16.5.126172.16.5.127
12172.16.5.128/25172.16.5.129 – 172.16.5.254172.16.5.255
13172.16.6.0/25172.16.6.1 – 172.16.6.126172.16.6.127
14172.16.6.128/25172.16.6.129 – 172.16.6.254172.16.6.255
15172.16.7.0/25172.16.7.1 – 172.16.7.126172.16.7.127
16172.16.7.128/25172.16.7.129 – 172.16.7.254172.16.7.255
17172.16.8.0/25172.16.8.1 – 172.16.8.126172.16.8.127
18172.16.8.128/25172.16.8.129 – 172.16.8.254172.16.8.255
19172.16.9.0/25172.16.9.1 – 172.16.9.126172.16.9.127
20172.16.9.128/25172.16.9.129 – 172.16.9.254172.16.9.255
21172.16.10.0/25172.16.10.1 – 172.16.10.126172.16.10.127
22172.16.10.128/25172.16.10.129 – 172.16.10.254172.16.10.255
23172.16.11.0/25172.16.11.1 – 172.16.11.126172.16.11.127
24172.16.11.128/25172.16.11.129 – 172.16.11.254172.16.11.255
25172.16.12.0/25172.16.12.1 – 172.16.12.126172.16.12.127
26172.16.12.128/25172.16.12.129 – 172.16.12.254172.16.12.255
27172.16.13.0/25172.16.13.1 – 172.16.13.126172.16.13.127
28172.16.13.128/25172.16.13.129 – 172.16.13.254172.16.13.255
29172.16.14.0/25172.16.14.1 – 172.16.14.126172.16.14.127
30172.16.14.128/25172.16.14.129 – 172.16.14.254172.16.14.255
31172.16.15.0/25172.16.15.1 – 172.16.15.126172.16.15.127
32172.16.15.128/25172.16.15.129 – 172.16.15.254172.16.15.255
01 / table

IPv4 CIDR prefix table.

Click a prefix longer than your network to split it into subnets.

prefixsubnet maskaddresseshostsin your /20
/00.0.0.04,294,967,2964,294,967,294-
/1128.0.0.02,147,483,6482,147,483,646-
/2192.0.0.01,073,741,8241,073,741,822-
/3224.0.0.0536,870,912536,870,910-
/4240.0.0.0268,435,456268,435,454-
/5248.0.0.0134,217,728134,217,726-
/6252.0.0.067,108,86467,108,862-
/7254.0.0.033,554,43233,554,430-
/8255.0.0.016,777,21616,777,214-
/9255.128.0.08,388,6088,388,606-
/10255.192.0.04,194,3044,194,302-
/11255.224.0.02,097,1522,097,150-
/12255.240.0.01,048,5761,048,574-
/13255.248.0.0524,288524,286-
/14255.252.0.0262,144262,142-
/15255.254.0.0131,072131,070-
/16255.255.0.065,53665,534-
/17255.255.128.032,76832,766-
/18255.255.192.016,38416,382-
/19255.255.224.08,1928,190-
/20255.255.240.04,0964,0941
/21255.255.248.02,0482,0462 split →
/22255.255.252.01,0241,0224 split →
/23255.255.254.05125108 split →
/24255.255.255.025625416 split →
/25255.255.255.12812812632 split →
/26255.255.255.192646264 split →
/27255.255.255.2243230128 split →
/28255.255.255.2401614256 split →
/29255.255.255.24886512 split →
/30255.255.255.252421,024 split →
/31255.255.255.254222,048 split →
/32255.255.255.255114,096 split →
02 / faq

About this calculator.

How do I use this subnet calculator?

▼

Type an IP address followed by a prefix, like 192.168.1.10/24, or by a subnet mask, like 192.168.1.10 255.255.255.0. Without a prefix it uses /24. Click a row in the table to split the network into smaller subnets.

Why are usable hosts always 2 fewer?

▼

The first address in a subnet is the network address and the last is the broadcast address, so neither can go to a device. The exceptions are /31 (point-to-point links, RFC 3021) and /32 (a single address), which use every address.

Can I use it from a terminal?

▼

Yes. curl 'ipku.in/en/tools/ipv4-subnet-calculator?q=192.168.1.10/24' returns the result as plain text.

Learn how to work it out →