IP Range Calculator
Enter an IPv4 address and either a subnet mask (example: 255.255.255.0) or CIDR prefix (example: /24 or 24).
If you need to quickly calculate a network range from an IP and subnet mask, this tool gives you the exact network address, broadcast address, first usable IP, last usable IP, and host counts. It is designed for practical networking work: VLAN planning, firewall rules, cloud VPC setup, and troubleshooting overlapping subnets.
What an IP range calculator with subnet mask does
An IPv4 address by itself does not tell you the full network boundaries. The subnet mask (or CIDR prefix) tells you which bits are network bits and which bits are host bits. Once those boundaries are known, we can calculate:
- Network address (the first address in the subnet)
- Broadcast address (the last address in the subnet, except special point-to-point use)
- Usable host range (the assignable IPs for devices)
- Total addresses and usable host count
- Wildcard mask (often used in ACL configurations)
How subnet masks define the range
A subnet mask is a 32-bit number. Every 1 bit marks network space; every 0 bit marks host space. In CIDR, /24 means 24 network bits and 8 host bits. Host bits determine how large the subnet is.
For example, a /24 has 8 host bits, so total addresses are 2^8 = 256. In traditional LAN use, two are reserved (network and broadcast), so 254 are usable.
Worked example
Input: 192.168.10.42/27
- Subnet mask: 255.255.255.224
- Block size: 32 addresses
- Network: 192.168.10.32
- Broadcast: 192.168.10.63
- Usable hosts: 192.168.10.33 - 192.168.10.62
Common subnet masks and host capacity
| CIDR | Subnet Mask | Total Addresses | Usable Hosts (Typical) |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
Special cases: /31 and /32
Two prefixes behave differently:
- /31: Common on point-to-point links. Both addresses are usable (RFC 3021).
- /32: A single host route. Network, broadcast, and host are effectively the same address.
Practical use cases
1) Network design
When splitting a larger block into subnets, use this calculator to ensure each VLAN has enough headroom for growth.
2) Security policy and ACLs
Wildcard masks and exact ranges are useful when writing allow/deny rules on routers and firewalls.
3) Cloud and hybrid infrastructure
AWS, Azure, and GCP all rely on CIDR blocks. Correct subnet boundaries prevent routing conflicts and overlap with on-premises networks.
Common mistakes to avoid
- Using non-contiguous subnet masks (invalid in modern IP subnetting).
- Forgetting that network and broadcast are reserved in typical subnets (/30 and larger host space).
- Mixing decimal mask and CIDR incorrectly (for example, 255.255.0.0 is /16, not /24).
- Planning without growth margin, causing rapid subnet exhaustion.
Quick FAQ
Can I enter either /24 or 255.255.255.0?
Yes. This calculator accepts either format and normalizes the result.
What is the wildcard mask?
It is the inverse of the subnet mask. For 255.255.255.0, the wildcard is 0.0.0.255.
Why does private/public type matter?
Private ranges (RFC 1918) are intended for internal networks and are not directly routable on the public internet.