Hosts Per Subnet Calculator – Usable IP Addresses

Calculate usable host addresses in any subnet from CIDR prefix.

About This Calculator

Calculate usable host addresses in any subnet from CIDR prefix. Use the calculator above for instant results.

Worked Examples

Example 1: /24

  • 256 total | 254 usable

Answer: 254 hosts

Example 2: /22

  • 1,024 total | 1,022 usable

Answer: 1,022 hosts

Example 3: /30

  • 4 total | 2 usable (router link)

Answer: 2 hosts

Who Uses This Calculator?

🔧
Network Engineers

IP space planning.

📊
IT Admins

Right-size subnets.

💻
CCNA Students

Subnetting exam prep.

🏫
CS Students

Networking coursework.

Common Mistakes to Avoid

❌ Always -2 for network and broadcast

Network address and broadcast address are not usable. /24 has 256 addresses but 254 hosts.

❌ Plan for growth

Add 50-100% growth buffer. Renumbering a live network is painful.

Frequently Asked Questions

Hosts by prefix?

/30=2, /29=6, /28=14, /27=30, /26=62, /25=126, /24=254, /23=510, /22=1022.

Right-size subnets?

Start with hosts needed, find smallest prefix >= that count. Add buffer for growth.

IPv6?

IPv6 /64 has 2^64 addresses — practically unlimited. Different conventions apply.