🌐 IPv4 Subnet Calculator
Calculate CIDR ranges, masks, and host details instantly in your browser.
What is an IPv4 Subnet Calculator?
An IPv4 subnet calculator helps you understand how an IP address fits inside a network range. Given an address and prefix length, it calculates the network ID, broadcast address, subnet mask, wildcard mask, host range, and number of available hosts. This removes manual binary math and reduces mistakes during network design and troubleshooting.
Subnet calculations are used daily by network engineers, cloud teams, DevOps engineers, and security analysts. Whether you are configuring a VPC subnet, writing ACLs, setting up DHCP pools, or checking route overlap, accurate CIDR math is essential. One wrong subnet can cause inaccessible services, traffic leaks, or conflicting routes.
This tool computes subnet information in real time using client-side JavaScript. It works on any modern browser and does not send your input anywhere. You can quickly test ranges, compare prefixes like /24 versus /27, and verify exact boundaries before applying production changes.
How to Use This Tool
- Enter an IPv4 address, for example
10.0.12.34or192.168.1.10. - Use the prefix slider to choose the CIDR length from
/0to/32. - Click Calculate, or wait for auto-calc while typing.
- Review network details including network address, broadcast, usable host range, and mask values.
- Use the results to validate firewall scopes, routing entries, and subnet plans.
Key Features
- Fast CIDR math for any IPv4 prefix length from /0 to /32.
- Shows subnet mask, wildcard mask, and binary mask representation.
- Displays total addresses and usable host counts with /31 and /32 handling.
- Identifies class and whether the address is in a private RFC1918 range.
- Runs completely in-browser with no server dependency.
Frequently Asked Questions
What is CIDR notation?
CIDR expresses a subnet as an IP plus prefix length, such as 192.168.1.0/24. The prefix indicates how many leading bits are fixed as the network portion.
How many hosts are in a /24?
A /24 has 256 total addresses. In traditional subnetting, 254 are usable host addresses because one is network and one is broadcast.
Why are /31 and /32 special?
/31 is often used for point-to-point links and effectively provides two usable endpoints. /32 represents a single host route.
Does this support IPv6?
This page is focused on IPv4 only. IPv6 subnetting uses different address size and notation rules.