Calculator
Example data table
| IP address | Prefix | Network | Broadcast | Usable range | Valid host? |
|---|---|---|---|---|---|
| 192.168.10.25 | /24 | 192.168.10.0 | 192.168.10.255 | 192.168.10.1 to 192.168.10.254 | Yes |
| 10.0.0.0 | /24 | 10.0.0.0 | 10.0.0.255 | 10.0.0.1 to 10.0.0.254 | No |
| 172.16.5.3 | /30 | 172.16.5.0 | 172.16.5.3 | 172.16.5.1 to 172.16.5.2 | No |
Formula used
The calculator converts the IPv4 address and subnet mask into 32-bit numbers. It then uses binary operations to find each boundary.
- Subnet mask = 32 one bits shifted by the prefix length.
- Wildcard mask = NOT subnet mask.
- Network address = IP address AND subnet mask.
- Broadcast address = network address OR wildcard mask.
- Total addresses = 2 raised to 32 minus prefix length.
- Usable hosts = total addresses minus 2 for prefixes from /0 to /30.
For /31, both addresses may be usable on point-to-point links. For /32, the single address is treated as one exact host.
How to use this calculator
- Enter the IPv4 address you want to test.
- Enter a CIDR prefix, such as 24 or 30.
- Optionally enter a dotted subnet mask.
- Set the host number if you want a numbered usable host.
- Set how many sample host addresses should appear.
- Press Submit to calculate the subnet and host result.
- Use CSV or PDF download for saving the output.
Valid host planning guide
Why host validity matters
A valid host address is an address that can be assigned to a device inside a subnet. It must not be the network address. It must not be the broadcast address in normal IPv4 subnets. This rule protects routing, discovery, and delivery. When a host uses a reserved edge address, other devices may fail to reach it. The calculator checks these limits before you assign an address.
How subnet limits are found
IPv4 addresses contain thirty two bits. The prefix length tells how many bits identify the network. The remaining bits identify hosts. A longer prefix creates a smaller subnet. A shorter prefix creates a larger subnet. The subnet mask is the dotted form of the prefix. The wildcard mask is the reverse of the subnet mask. These values help administrators read firewall rules, access lists, and routing tables.
Usable host range
For most subnets, the first address is the network address. The last address is the broadcast address. Usable hosts sit between them. A /24 network usually has 256 total addresses and 254 usable hosts. A /30 network has four total addresses and two usable hosts. A /31 network is special. It is often used on point to point links, where both addresses can be usable. A /32 represents one exact host route.
Practical use
Use this tool before adding servers, cameras, printers, routers, or virtual machines. Enter the IP address and prefix. You can also enter a dotted mask. The tool returns the subnet range, host status, total addresses, usable hosts, and a selected host number. It also labels private, multicast, loopback, documentation, and other special ranges. That context prevents risky assignments and confusing network plans.
Planning tips
Keep one documented source for each subnet. Reserve addresses for gateways, infrastructure, and future growth. Avoid mixing static assignments with DHCP pools. Export results when you need a record for tickets, audits, or diagrams. Check every change again after changing a prefix, because one digit can move an address into another subnet.
Common mistakes
Do not judge validity from the first octet alone. Modern networks use variable length masks. Always read the prefix, then calculate the exact network and broadcast boundaries first.
FAQs
What is a valid host address?
A valid host address is an IPv4 address that can be assigned to a device inside a subnet. In normal subnets, it cannot be the network address or broadcast address.
Why is the network address not usable?
The network address identifies the whole subnet. Routers and devices use it as a boundary label. Assigning it to a host can break communication.
Why is the broadcast address not usable?
The broadcast address sends traffic to all devices in the subnet. A normal host should not use that special address for its interface.
Does /31 have usable host addresses?
Yes, /31 can use both addresses on point-to-point links. This calculator treats both as usable and explains the rule in the result.
What does /32 mean?
A /32 prefix identifies one exact IPv4 address. It is commonly used for host routes, loopbacks, firewall rules, and precise route targets.
Can I enter a subnet mask instead of CIDR?
Yes. Enter a dotted subnet mask such as 255.255.255.0. When valid, it overrides the prefix field and becomes the calculated prefix.
What is a wildcard mask?
A wildcard mask is the inverse of the subnet mask. It shows which bits may vary inside the subnet and helps with network rules.
Why export CSV or PDF?
Exports help save calculations for tickets, documentation, change records, audits, and design notes. They also reduce manual copying mistakes.