A subnet calculator takes an IP address and CIDR prefix length (like /24) and computes the network address, broadcast address, subnet mask, and total usable host addresses.
What is a subnet calculator?
A subnet calculator splits an IPv4 address and CIDR prefix into network details. Enter an IP like 192.168.1.0 and a prefix such as 24. It returns network and broadcast addresses, subnet mask, total addresses and usable host range for LAN planning.
How to use the subnet calculator
- Type a valid IPv4 address.
- Enter CIDR prefix length 0 to 32.
- Read network and broadcast addresses.
- Note subnet mask and host bit count.
- Use first and last host for DHCP pools.
About this calculator
A subnet calculator takes an IP address and CIDR prefix length (like /24) and computes the network address, broadcast address, subnet mask, and total usable host addresses. Subnetting is a basic part of network design and IP address management.
It is useful for network engineers, system administrators, and anyone managing network infrastructure.
How the math works
- : Network prefix length (e.g. /24 means 24 bits for network)
- : Total IP addresses in the block
- : Subtract network address and broadcast address
Subnet calculator example: 192.168.1.0/24
A /24 leaves 8 host bits, so 2⁸ = 256 addresses total. Mask becomes 255.255.255.0. Network address stays 192.168.1.0 and broadcast is 192.168.1.255.
Usable hosts = 256 − 2 = 254. First host is 192.168.1.1 and last is 192.168.1.254. DHCP pools usually start at .100 and end before .200, but your router manual may differ.
Enter those values here to double-check a home LAN before you assign static IPs to printers or NAS boxes. For a /30 point-to-point link, expect only two usable hosts after network and broadcast are reserved.
Class C private ranges like 192.168.x.x almost always use /24 in home labs, so bookmark this page when you subnet practice exams.
For VLAN design, list each subnet in a table with its gateway on the first usable host and DHCP in the middle of the range so printers can stay static.
Common uses
- Find the network address and broadcast address for a subnet
- Calculate how many hosts fit in a /24 or /16 subnet
- Design IP address allocation for a network
- Troubleshoot IP addressing conflicts in a network
Frequently asked questions
How many hosts does a /24 subnet support?
A /24 subnet has 32 − 24 = 8 host bits, giving 2^8 = 256 total addresses. Subtracting the network address and broadcast address leaves 254 usable host addresses. Common subnets: /30 = 2 hosts, /29 = 6, /28 = 14, /27 = 30, /26 = 62, /25 = 126, /24 = 254, /23 = 510, /16 = 65,534.
How many usable hosts does a /26 subnet provide?
A /26 has 32 − 26 = 6 host bits, so 2⁶ = 64 addresses. Subtract network and broadcast to get 62 usable hosts. Type your network address with /26 to list the exact range.
What is the broadcast address for 10.0.0.0/23?
Enter 10.0.0.0 with prefix 23. The tool ANDs the IP with the mask, then ORs host bits for broadcast. /23 spans two class-C blocks, so verify the listed broadcast before you paste it into firewall rules.
Why does my Wi-Fi router show 192.168.0.1 but my lab uses 192.168.1.0/24?
Both are private RFC1918 ranges. The calculator works on any valid IPv4 you enter. Match the prefix your router UI shows, often /24, so gateway and DHCP pool line up with the computed network row.
How many usable hosts does a /30 WAN link allow?
A /30 has two host bits, giving four total addresses. Network and broadcast take two, leaving two usable hosts. That pattern is common on point-to-point router links. Enter your provider IP with /30 to see the exact pair you may assign.
Related calculators
- Tip Calculator
- Fuel Cost Calculator
- Gas Mileage Calculator
- Concrete Calculator
- Password Generator
- Dice Roller
- Coin Flipper
- Paint Calculator
Maintained by J Jaya Prakash · Last updated: October 2026