Skip to main content

Tech & wiring

IP Subnet Calculator: CIDR, Mask & Host Range

Calculate IP ranges, subnet masks, and usable hosts. Visual binary breakdown and cheat sheet.

IP version
🌐

Subnet Calculator

Network class

Filters subnet mask options (classful reference). β€œAny” lists /1–/32.

IP address (binary)
11000000Β·10101000Β·00000001Β·00000000
Subnet mask (binary)

1s = network bits (slate), 0s = host bits (green). A /24 uses exactly 3 octets.

11111111Β·11111111Β·11111111Β·00000000

/24 subnets in the same parent span as 192.168.*.*256 total

NetworkUsable host rangeBroadcast
192.168.0.0192.168.0.1 - 192.168.0.254192.168.0.255
192.168.1.0192.168.1.1 - 192.168.1.254192.168.1.255
192.168.2.0192.168.2.1 - 192.168.2.254192.168.2.255
192.168.3.0192.168.3.1 - 192.168.3.254192.168.3.255
192.168.4.0192.168.4.1 - 192.168.4.254192.168.4.255
192.168.5.0192.168.5.1 - 192.168.5.254192.168.5.255
192.168.6.0192.168.6.1 - 192.168.6.254192.168.6.255
192.168.7.0192.168.7.1 - 192.168.7.254192.168.7.255
192.168.8.0192.168.8.1 - 192.168.8.254192.168.8.255
192.168.9.0192.168.9.1 - 192.168.9.254192.168.9.255
192.168.10.0192.168.10.1 - 192.168.10.254192.168.10.255
192.168.11.0192.168.11.1 - 192.168.11.254192.168.11.255
192.168.12.0192.168.12.1 - 192.168.12.254192.168.12.255
192.168.13.0192.168.13.1 - 192.168.13.254192.168.13.255
192.168.14.0192.168.14.1 - 192.168.14.254192.168.14.255
192.168.15.0192.168.15.1 - 192.168.15.254192.168.15.255
192.168.16.0192.168.16.1 - 192.168.16.254192.168.16.255
192.168.17.0192.168.17.1 - 192.168.17.254192.168.17.255
192.168.18.0192.168.18.1 - 192.168.18.254192.168.18.255
192.168.19.0192.168.19.1 - 192.168.19.254192.168.19.255
192.168.20.0192.168.20.1 - 192.168.20.254192.168.20.255
192.168.21.0192.168.21.1 - 192.168.21.254192.168.21.255
192.168.22.0192.168.22.1 - 192.168.22.254192.168.22.255
192.168.23.0192.168.23.1 - 192.168.23.254192.168.23.255
192.168.24.0192.168.24.1 - 192.168.24.254192.168.24.255
192.168.25.0192.168.25.1 - 192.168.25.254192.168.25.255
192.168.26.0192.168.26.1 - 192.168.26.254192.168.26.255
192.168.27.0192.168.27.1 - 192.168.27.254192.168.27.255
192.168.28.0192.168.28.1 - 192.168.28.254192.168.28.255
192.168.29.0192.168.29.1 - 192.168.29.254192.168.29.255
192.168.30.0192.168.30.1 - 192.168.30.254192.168.30.255
192.168.31.0192.168.31.1 - 192.168.31.254192.168.31.255
192.168.32.0192.168.32.1 - 192.168.32.254192.168.32.255
192.168.33.0192.168.33.1 - 192.168.33.254192.168.33.255
192.168.34.0192.168.34.1 - 192.168.34.254192.168.34.255
192.168.35.0192.168.35.1 - 192.168.35.254192.168.35.255
192.168.36.0192.168.36.1 - 192.168.36.254192.168.36.255
192.168.37.0192.168.37.1 - 192.168.37.254192.168.37.255
192.168.38.0192.168.38.1 - 192.168.38.254192.168.38.255
192.168.39.0192.168.39.1 - 192.168.39.254192.168.39.255
192.168.40.0192.168.40.1 - 192.168.40.254192.168.40.255
192.168.41.0192.168.41.1 - 192.168.41.254192.168.41.255
192.168.42.0192.168.42.1 - 192.168.42.254192.168.42.255
192.168.43.0192.168.43.1 - 192.168.43.254192.168.43.255
192.168.44.0192.168.44.1 - 192.168.44.254192.168.44.255
192.168.45.0192.168.45.1 - 192.168.45.254192.168.45.255
192.168.46.0192.168.46.1 - 192.168.46.254192.168.46.255
192.168.47.0192.168.47.1 - 192.168.47.254192.168.47.255
192.168.48.0192.168.48.1 - 192.168.48.254192.168.48.255
192.168.49.0192.168.49.1 - 192.168.49.254192.168.49.255
192.168.50.0192.168.50.1 - 192.168.50.254192.168.50.255
192.168.51.0192.168.51.1 - 192.168.51.254192.168.51.255
192.168.52.0192.168.52.1 - 192.168.52.254192.168.52.255
192.168.53.0192.168.53.1 - 192.168.53.254192.168.53.255
192.168.54.0192.168.54.1 - 192.168.54.254192.168.54.255
192.168.55.0192.168.55.1 - 192.168.55.254192.168.55.255
192.168.56.0192.168.56.1 - 192.168.56.254192.168.56.255
192.168.57.0192.168.57.1 - 192.168.57.254192.168.57.255
192.168.58.0192.168.58.1 - 192.168.58.254192.168.58.255
192.168.59.0192.168.59.1 - 192.168.59.254192.168.59.255
192.168.60.0192.168.60.1 - 192.168.60.254192.168.60.255
192.168.61.0192.168.61.1 - 192.168.61.254192.168.61.255
192.168.62.0192.168.62.1 - 192.168.62.254192.168.62.255
192.168.63.0192.168.63.1 - 192.168.63.254192.168.63.255
192.168.64.0192.168.64.1 - 192.168.64.254192.168.64.255
192.168.65.0192.168.65.1 - 192.168.65.254192.168.65.255
192.168.66.0192.168.66.1 - 192.168.66.254192.168.66.255
192.168.67.0192.168.67.1 - 192.168.67.254192.168.67.255
192.168.68.0192.168.68.1 - 192.168.68.254192.168.68.255
192.168.69.0192.168.69.1 - 192.168.69.254192.168.69.255
192.168.70.0192.168.70.1 - 192.168.70.254192.168.70.255
192.168.71.0192.168.71.1 - 192.168.71.254192.168.71.255
192.168.72.0192.168.72.1 - 192.168.72.254192.168.72.255
192.168.73.0192.168.73.1 - 192.168.73.254192.168.73.255
192.168.74.0192.168.74.1 - 192.168.74.254192.168.74.255
192.168.75.0192.168.75.1 - 192.168.75.254192.168.75.255
192.168.76.0192.168.76.1 - 192.168.76.254192.168.76.255
192.168.77.0192.168.77.1 - 192.168.77.254192.168.77.255
192.168.78.0192.168.78.1 - 192.168.78.254192.168.78.255
192.168.79.0192.168.79.1 - 192.168.79.254192.168.79.255
192.168.80.0192.168.80.1 - 192.168.80.254192.168.80.255
192.168.81.0192.168.81.1 - 192.168.81.254192.168.81.255
192.168.82.0192.168.82.1 - 192.168.82.254192.168.82.255
192.168.83.0192.168.83.1 - 192.168.83.254192.168.83.255
192.168.84.0192.168.84.1 - 192.168.84.254192.168.84.255
192.168.85.0192.168.85.1 - 192.168.85.254192.168.85.255
192.168.86.0192.168.86.1 - 192.168.86.254192.168.86.255
192.168.87.0192.168.87.1 - 192.168.87.254192.168.87.255
192.168.88.0192.168.88.1 - 192.168.88.254192.168.88.255
192.168.89.0192.168.89.1 - 192.168.89.254192.168.89.255
192.168.90.0192.168.90.1 - 192.168.90.254192.168.90.255
192.168.91.0192.168.91.1 - 192.168.91.254192.168.91.255
192.168.92.0192.168.92.1 - 192.168.92.254192.168.92.255
192.168.93.0192.168.93.1 - 192.168.93.254192.168.93.255
192.168.94.0192.168.94.1 - 192.168.94.254192.168.94.255
192.168.95.0192.168.95.1 - 192.168.95.254192.168.95.255
192.168.96.0192.168.96.1 - 192.168.96.254192.168.96.255
192.168.97.0192.168.97.1 - 192.168.97.254192.168.97.255
192.168.98.0192.168.98.1 - 192.168.98.254192.168.98.255
192.168.99.0192.168.99.1 - 192.168.99.254192.168.99.255
192.168.100.0192.168.100.1 - 192.168.100.254192.168.100.255
192.168.101.0192.168.101.1 - 192.168.101.254192.168.101.255
192.168.102.0192.168.102.1 - 192.168.102.254192.168.102.255
192.168.103.0192.168.103.1 - 192.168.103.254192.168.103.255
192.168.104.0192.168.104.1 - 192.168.104.254192.168.104.255
192.168.105.0192.168.105.1 - 192.168.105.254192.168.105.255
192.168.106.0192.168.106.1 - 192.168.106.254192.168.106.255
192.168.107.0192.168.107.1 - 192.168.107.254192.168.107.255
192.168.108.0192.168.108.1 - 192.168.108.254192.168.108.255
192.168.109.0192.168.109.1 - 192.168.109.254192.168.109.255
192.168.110.0192.168.110.1 - 192.168.110.254192.168.110.255
192.168.111.0192.168.111.1 - 192.168.111.254192.168.111.255
192.168.112.0192.168.112.1 - 192.168.112.254192.168.112.255
192.168.113.0192.168.113.1 - 192.168.113.254192.168.113.255
192.168.114.0192.168.114.1 - 192.168.114.254192.168.114.255
192.168.115.0192.168.115.1 - 192.168.115.254192.168.115.255
192.168.116.0192.168.116.1 - 192.168.116.254192.168.116.255
192.168.117.0192.168.117.1 - 192.168.117.254192.168.117.255
192.168.118.0192.168.118.1 - 192.168.118.254192.168.118.255
192.168.119.0192.168.119.1 - 192.168.119.254192.168.119.255
192.168.120.0192.168.120.1 - 192.168.120.254192.168.120.255
192.168.121.0192.168.121.1 - 192.168.121.254192.168.121.255
192.168.122.0192.168.122.1 - 192.168.122.254192.168.122.255
192.168.123.0192.168.123.1 - 192.168.123.254192.168.123.255
192.168.124.0192.168.124.1 - 192.168.124.254192.168.124.255
192.168.125.0192.168.125.1 - 192.168.125.254192.168.125.255
192.168.126.0192.168.126.1 - 192.168.126.254192.168.126.255
192.168.127.0192.168.127.1 - 192.168.127.254192.168.127.255
192.168.128.0192.168.128.1 - 192.168.128.254192.168.128.255
192.168.129.0192.168.129.1 - 192.168.129.254192.168.129.255
192.168.130.0192.168.130.1 - 192.168.130.254192.168.130.255
192.168.131.0192.168.131.1 - 192.168.131.254192.168.131.255
192.168.132.0192.168.132.1 - 192.168.132.254192.168.132.255
192.168.133.0192.168.133.1 - 192.168.133.254192.168.133.255
192.168.134.0192.168.134.1 - 192.168.134.254192.168.134.255
192.168.135.0192.168.135.1 - 192.168.135.254192.168.135.255
192.168.136.0192.168.136.1 - 192.168.136.254192.168.136.255
192.168.137.0192.168.137.1 - 192.168.137.254192.168.137.255
192.168.138.0192.168.138.1 - 192.168.138.254192.168.138.255
192.168.139.0192.168.139.1 - 192.168.139.254192.168.139.255
192.168.140.0192.168.140.1 - 192.168.140.254192.168.140.255
192.168.141.0192.168.141.1 - 192.168.141.254192.168.141.255
192.168.142.0192.168.142.1 - 192.168.142.254192.168.142.255
192.168.143.0192.168.143.1 - 192.168.143.254192.168.143.255
192.168.144.0192.168.144.1 - 192.168.144.254192.168.144.255
192.168.145.0192.168.145.1 - 192.168.145.254192.168.145.255
192.168.146.0192.168.146.1 - 192.168.146.254192.168.146.255
192.168.147.0192.168.147.1 - 192.168.147.254192.168.147.255
192.168.148.0192.168.148.1 - 192.168.148.254192.168.148.255
192.168.149.0192.168.149.1 - 192.168.149.254192.168.149.255
192.168.150.0192.168.150.1 - 192.168.150.254192.168.150.255
192.168.151.0192.168.151.1 - 192.168.151.254192.168.151.255
192.168.152.0192.168.152.1 - 192.168.152.254192.168.152.255
192.168.153.0192.168.153.1 - 192.168.153.254192.168.153.255
192.168.154.0192.168.154.1 - 192.168.154.254192.168.154.255
192.168.155.0192.168.155.1 - 192.168.155.254192.168.155.255
192.168.156.0192.168.156.1 - 192.168.156.254192.168.156.255
192.168.157.0192.168.157.1 - 192.168.157.254192.168.157.255
192.168.158.0192.168.158.1 - 192.168.158.254192.168.158.255
192.168.159.0192.168.159.1 - 192.168.159.254192.168.159.255
192.168.160.0192.168.160.1 - 192.168.160.254192.168.160.255
192.168.161.0192.168.161.1 - 192.168.161.254192.168.161.255
192.168.162.0192.168.162.1 - 192.168.162.254192.168.162.255
192.168.163.0192.168.163.1 - 192.168.163.254192.168.163.255
192.168.164.0192.168.164.1 - 192.168.164.254192.168.164.255
192.168.165.0192.168.165.1 - 192.168.165.254192.168.165.255
192.168.166.0192.168.166.1 - 192.168.166.254192.168.166.255
192.168.167.0192.168.167.1 - 192.168.167.254192.168.167.255
192.168.168.0192.168.168.1 - 192.168.168.254192.168.168.255
192.168.169.0192.168.169.1 - 192.168.169.254192.168.169.255
192.168.170.0192.168.170.1 - 192.168.170.254192.168.170.255
192.168.171.0192.168.171.1 - 192.168.171.254192.168.171.255
192.168.172.0192.168.172.1 - 192.168.172.254192.168.172.255
192.168.173.0192.168.173.1 - 192.168.173.254192.168.173.255
192.168.174.0192.168.174.1 - 192.168.174.254192.168.174.255
192.168.175.0192.168.175.1 - 192.168.175.254192.168.175.255
192.168.176.0192.168.176.1 - 192.168.176.254192.168.176.255
192.168.177.0192.168.177.1 - 192.168.177.254192.168.177.255
192.168.178.0192.168.178.1 - 192.168.178.254192.168.178.255
192.168.179.0192.168.179.1 - 192.168.179.254192.168.179.255
192.168.180.0192.168.180.1 - 192.168.180.254192.168.180.255
192.168.181.0192.168.181.1 - 192.168.181.254192.168.181.255
192.168.182.0192.168.182.1 - 192.168.182.254192.168.182.255
192.168.183.0192.168.183.1 - 192.168.183.254192.168.183.255
192.168.184.0192.168.184.1 - 192.168.184.254192.168.184.255
192.168.185.0192.168.185.1 - 192.168.185.254192.168.185.255
192.168.186.0192.168.186.1 - 192.168.186.254192.168.186.255
192.168.187.0192.168.187.1 - 192.168.187.254192.168.187.255
192.168.188.0192.168.188.1 - 192.168.188.254192.168.188.255
192.168.189.0192.168.189.1 - 192.168.189.254192.168.189.255
192.168.190.0192.168.190.1 - 192.168.190.254192.168.190.255
192.168.191.0192.168.191.1 - 192.168.191.254192.168.191.255
192.168.192.0192.168.192.1 - 192.168.192.254192.168.192.255
192.168.193.0192.168.193.1 - 192.168.193.254192.168.193.255
192.168.194.0192.168.194.1 - 192.168.194.254192.168.194.255
192.168.195.0192.168.195.1 - 192.168.195.254192.168.195.255
192.168.196.0192.168.196.1 - 192.168.196.254192.168.196.255
192.168.197.0192.168.197.1 - 192.168.197.254192.168.197.255
192.168.198.0192.168.198.1 - 192.168.198.254192.168.198.255
192.168.199.0192.168.199.1 - 192.168.199.254192.168.199.255
192.168.200.0192.168.200.1 - 192.168.200.254192.168.200.255
192.168.201.0192.168.201.1 - 192.168.201.254192.168.201.255
192.168.202.0192.168.202.1 - 192.168.202.254192.168.202.255
192.168.203.0192.168.203.1 - 192.168.203.254192.168.203.255
192.168.204.0192.168.204.1 - 192.168.204.254192.168.204.255
192.168.205.0192.168.205.1 - 192.168.205.254192.168.205.255
192.168.206.0192.168.206.1 - 192.168.206.254192.168.206.255
192.168.207.0192.168.207.1 - 192.168.207.254192.168.207.255
192.168.208.0192.168.208.1 - 192.168.208.254192.168.208.255
192.168.209.0192.168.209.1 - 192.168.209.254192.168.209.255
192.168.210.0192.168.210.1 - 192.168.210.254192.168.210.255
192.168.211.0192.168.211.1 - 192.168.211.254192.168.211.255
192.168.212.0192.168.212.1 - 192.168.212.254192.168.212.255
192.168.213.0192.168.213.1 - 192.168.213.254192.168.213.255
192.168.214.0192.168.214.1 - 192.168.214.254192.168.214.255
192.168.215.0192.168.215.1 - 192.168.215.254192.168.215.255
192.168.216.0192.168.216.1 - 192.168.216.254192.168.216.255
192.168.217.0192.168.217.1 - 192.168.217.254192.168.217.255
192.168.218.0192.168.218.1 - 192.168.218.254192.168.218.255
192.168.219.0192.168.219.1 - 192.168.219.254192.168.219.255
192.168.220.0192.168.220.1 - 192.168.220.254192.168.220.255
192.168.221.0192.168.221.1 - 192.168.221.254192.168.221.255
192.168.222.0192.168.222.1 - 192.168.222.254192.168.222.255
192.168.223.0192.168.223.1 - 192.168.223.254192.168.223.255
192.168.224.0192.168.224.1 - 192.168.224.254192.168.224.255
192.168.225.0192.168.225.1 - 192.168.225.254192.168.225.255
192.168.226.0192.168.226.1 - 192.168.226.254192.168.226.255
192.168.227.0192.168.227.1 - 192.168.227.254192.168.227.255
192.168.228.0192.168.228.1 - 192.168.228.254192.168.228.255
192.168.229.0192.168.229.1 - 192.168.229.254192.168.229.255
192.168.230.0192.168.230.1 - 192.168.230.254192.168.230.255
192.168.231.0192.168.231.1 - 192.168.231.254192.168.231.255
192.168.232.0192.168.232.1 - 192.168.232.254192.168.232.255
192.168.233.0192.168.233.1 - 192.168.233.254192.168.233.255
192.168.234.0192.168.234.1 - 192.168.234.254192.168.234.255
192.168.235.0192.168.235.1 - 192.168.235.254192.168.235.255
192.168.236.0192.168.236.1 - 192.168.236.254192.168.236.255
192.168.237.0192.168.237.1 - 192.168.237.254192.168.237.255
192.168.238.0192.168.238.1 - 192.168.238.254192.168.238.255
192.168.239.0192.168.239.1 - 192.168.239.254192.168.239.255
192.168.240.0192.168.240.1 - 192.168.240.254192.168.240.255
192.168.241.0192.168.241.1 - 192.168.241.254192.168.241.255
192.168.242.0192.168.242.1 - 192.168.242.254192.168.242.255
192.168.243.0192.168.243.1 - 192.168.243.254192.168.243.255
192.168.244.0192.168.244.1 - 192.168.244.254192.168.244.255
192.168.245.0192.168.245.1 - 192.168.245.254192.168.245.255
192.168.246.0192.168.246.1 - 192.168.246.254192.168.246.255
192.168.247.0192.168.247.1 - 192.168.247.254192.168.247.255
192.168.248.0192.168.248.1 - 192.168.248.254192.168.248.255
192.168.249.0192.168.249.1 - 192.168.249.254192.168.249.255
192.168.250.0192.168.250.1 - 192.168.250.254192.168.250.255
192.168.251.0192.168.251.1 - 192.168.251.254192.168.251.255
192.168.252.0192.168.252.1 - 192.168.252.254192.168.252.255
192.168.253.0192.168.253.1 - 192.168.253.254192.168.253.255
192.168.254.0192.168.254.1 - 192.168.254.254192.168.254.255
192.168.255.0192.168.255.1 - 192.168.255.254192.168.255.255

Information hub

What is a subnet?

Think of the internet like a city. The network portion identifies the street, routers use it to reach the right neighborhood. The host portion is the house number.

A /24 gives you 256 addresses; a /16 gives you 65,536. The CIDR number shows where network ends and host begins.

CIDR explained

Why /24 instead of 255.255.255.0? Same thing. The dotted-decimal mask means the first 24 bits are network. CIDR condenses that to /24.

CIDR is shorter and works across all mask lengths. Common in firewalls, AWS security groups, and router configs.

The reserved IPs

Why subtract 2? The network address (all host bits 0) and broadcast address (all host bits 1) are reserved.

Usable hosts = 2host_bits βˆ’ 2.

Typical subnets

Click a row to apply that prefix to the calculator. Search by prefix (/24), mask, or hosts (e.g. 500).

PrefixSubnet maskUsable hosts
/8255.0.0.016,777,214
/9255.128.0.08,388,606
/10255.192.0.04,194,302
/11255.224.0.02,097,150
/12255.240.0.01,048,574
/13255.248.0.0524,286
/14255.252.0.0262,142
/15255.254.0.0131,070
/16255.255.0.065,534
/17255.255.128.032,766
/18255.255.192.016,382
/19255.255.224.08,190
/20255.255.240.04,094
/21255.255.248.02,046
/22255.255.252.01,022
/23255.255.254.0510
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2542
/32255.255.255.2550

Subnetting: Network vs Host, IPv4 vs IPv6

Every IP address has two parts: the network prefix (where it lives) and the host portion (which device). Subnet masks and CIDR define the boundary. Here is how the math works and why /24 and /64 show up everywhere.

Core Concepts

Network address

The "start" of a subnet, all host bits are 0. Routers use it to identify the subnet. 192.168.1.0/24 has network address 192.168.1.0.

Broadcast address

The "shout" address, all host bits are 1. Packets sent here reach every host on the subnet. In 192.168.1.0/24, broadcast is 192.168.1.255.

CIDR notation

/24 means 24 network bits. Shorter to type than 255.255.255.0. Works for any prefix length, /8 through /32 for IPv4, /8 through /128 for IPv6.

Usable range

First usable = network + 1. Last usable = broadcast βˆ’ 1. Total usable = 2(32βˆ’n)βˆ’22^{(32-n)} - 2 for IPv4. IPv6 has no broadcast, so all addresses in the range are usable.

IP Subnet Calculator: CIDR, Mask, Host Range & IPv6

Calculate IPv4 and IPv6 subnets: network address, broadcast, usable host range, and prefix info. Binary visualizer, cheat sheet, and CIDR converter. Free subnet calculator for engineers.

What This Tool Does

IPv4: Enter an IP and CIDR, get network address, broadcast, usable host range, and total hosts. A binary visualizer shows network vs host bits. A cheat sheet lists typical prefixes (/8 through /32) with one click to apply. IPv6: Enter an address and prefix, get expanded/compressed format, network address, IP range, and total addresses. Hextet cards color-code Global Routing Prefix, Subnet ID, and Interface ID.

How the Math Works

An IPv4 address is a 32-bit number split into a network prefix and a host portion by the subnet mask. The number of usable host addresses in a subnet is:
UsableΒ Hosts=2(32βˆ’n)βˆ’2\text{Usable Hosts} = 2^{(32 - n)} - 2
where n is the CIDR prefix length. The subtraction of 2 accounts for the network address (all host bits 0) and the broadcast address (all host bits 1). The network address is found by bitwise-ANDing the IP with the mask; the broadcast address is found by bitwise-ORing the IP with the inverted mask. For IPv6, the formula uses 128 bits instead of 32, and there is no broadcast address, so no subtraction is needed.
  • IPv4 Example:
    192.168.1.0/24 β†’ mask 255.255.255.0, 256 total addresses, 254 usable hosts. Network = .0, broadcast = .255, usable range = .1–.254.
  • IPv6 Scale:
    A /64 prefix yields 2⁢⁴ = 18.4 quintillion addresses per subnetβ€”no NAT needed. Common allocations: /48 enterprise, /56 residential, /64 per link.
  • Edge Cases:
    /31 (point-to-point) has 0 usable hosts by the standard formula but is used per RFC 3021. /32 is a single host address.

How to Use This Calculator

Select the IPv4 or IPv6 tab. For IPv4, type an IP address and CIDR prefix (e.g., 192.168.1.0/24). The calculator returns the network address, broadcast address, first and last usable hosts, and total host count. A binary visualizer highlights network bits (blue) vs. host bits (green) so you can see exactly where the boundary falls. For IPv6, enter an address and prefix (e.g., 2001:db8::/48) to see expanded and compressed forms, the network address, IP range, and total addresses. Hextet cards color-code the Global Routing Prefix, Subnet ID, and Interface ID.
  • Cheat Sheet:
    Click any row in the built-in prefix table (/8 through /32 for IPv4) to instantly apply that prefix and see the resulting subnet details.
  • Binary Visualizer:
    Blue bits are network; green bits are host. The split updates as you change the prefix length, making octet and hextet boundaries visible.
  • Quick Apply:
    Common prefixes like /24 (256 addresses) and /64 (standard IPv6 LAN) are one click away in the reference panel.

IPv4: Why We Subtract 2

Two addresses in every IPv4 subnet are reserved. The network address (host bits = 0) identifies the subnet. The broadcast address (host bits = 1) delivers to every host. So usable hosts = 2(32βˆ’n)βˆ’22^{(32-n)} - 2. A /24 has 256 total addresses but only 254 you can assign to devices.

IPv6: The Unimaginable Scale

IPv6 has 2128 addresses, roughly 340 undecillion. A /64 gives 264 addresses (18,446,744,073,709,551,616) per subnet. No broadcast, no NAT for scaling. Common prefixes: /48 for enterprise (65,536 subnets), /56 for residential (256 subnets), /64 for a single link. The :: compresses consecutive zeros but can appear only once per address.

Hex Breakdown: GRP, Subnet ID, Interface ID

For /64: hextets 0-2 (bits 0-47) are the Global Routing Prefix. Hextet 3 (bits 48-63) is the Subnet ID. Hextets 4-7 (bits 64-127) are the Interface ID. The tool updates colors dynamically as you change the prefix. IPv6 uses hexadecimal: 0-9 and A-F (10-15).

IP Subnet Calculator FAQ

What is a subnet mask and how does CIDR relate to it?

A subnet mask marks which bits are network (1) vs host (0). CIDR condenses it: /24 means the first 24 bits are network. 255.255.255.0255.255.255.0 in dotted-decimal is the same as /24; both mean 24 network bits, 8 host bits. Usable hosts = 2(32βˆ’n)βˆ’22^{(32-n)} - 2 for IPv4 (network and broadcast addresses are reserved).

Why does my subnet only have 254 usable hosts when it holds 256 addresses?

Two addresses in every subnet are reserved: the network address (all host bits 0) and the broadcast address (all host bits 1). You can't assign those to devices. So a /24 has 256 total addresses but only 254 usable for hosts. The formula always subtracts 2 for IPv4 subnets.

What's the difference between IPv4 and IPv6 subnetting?

IPv4 uses 32 bits; IPv6 uses 128. IPv4 typically reserves 2 addresses (network + broadcast). IPv6 has no broadcast, it uses multicast. A standard IPv6 /64 gives 2⁢⁴ addresses (18 quintillion) per subnet. No NAT needed, the address space is enormous.

When should I use /48, /56, or /64 for IPv6?

/48 is common for enterprise sites, you get 65,536 /64 subnets. /56 is typical for residential ISP assignments, 256 subnets. /64 is the standard for a single LAN or link. Most devices expect a /64; going smaller can break SLAAC and some features.

How do I interpret the binary visualizer for the subnet mask?

The 1s (blue) are network bits; the 0s (green) are host bits. A /24 mask has 24 ones followed by 8 zeros, exactly 3 octets of network. The split shows where the "street address" ends and the "house number" begins. Same logic applies to IPv6 hextets.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

Β© 2026 CalcRegistry Reference Last System Check: May 2026Free Online Utility Tools