How to Calculate IP Subnets
IP Subnet Calculator
When to Calculate Subnets
Plan VPC CIDR blocks, verify firewall rules, debug routing tables, or determine whether two hosts share a subnet. Enter an IPv4 address and prefix length (or CIDR notation) to see network address, broadcast, host range, and usable host count.
What the Calculator Shows
Results include network and broadcast addresses, subnet mask in dotted decimal, wildcard mask, first and last usable host IPs, and total address count. Useful for AWS security group planning, office network design, and interview prep.
Developer Tips
- /24 subnets provide 254 usable hosts — common default for small VPCs
- Remember network and broadcast addresses are not assignable to hosts
- Double-check prefix length — /23 and /25 ranges differ dramatically in size
Frequently asked questions
Does this support IPv6?
This calculator focuses on IPv4 CIDR notation. IPv6 subnet planning uses different prefix conventions.
What input formats are accepted?
Enter an IPv4 address with CIDR prefix (e.g. 192.168.1.0/24) or separate address and mask fields depending on tool settings.