IP Subnet Calculator — Network Address, Host Range & Mask from Any CIDR
Drag the CIDR slider to calculate subnets instantly — no button to click
Subnetting calculations are a constant in network engineering, cloud architecture, and DevOps — figuring out the right CIDR block for a VPC, determining the broadcast address of a subnet, or validating that two hosts are on the same network all require the same set of calculations. This IP subnet calculator takes an IPv4 address and a CIDR prefix length and instantly computes the network address, broadcast address, first and last usable IP, total usable host count, subnet mask, wildcard mask, and full CIDR notation. Drag the slider from /0 to /32 and watch every value update in real time. A clickable CIDR reference table is included for quick lookup of common configurations.
How to Calculate IP Subnet Information
Enter an IP address and drag the CIDR slider — all subnet values calculate instantly.
Enter your IPv4 address
Type any valid IPv4 address into the input field (four octets separated by dots, each between 0 and 255). The field validates the address in real time and shows an error for invalid inputs. A default address of 192.168.1.100 is pre-filled as a starting point.
Set the CIDR prefix length
Drag the slider to select a prefix length from /0 to /32. Common values are /24 (a standard Class C subnet with 254 usable hosts), /16 (a Class B subnet), /8 (a Class A subnet), and /32 (a single host route). You can also click any row in the CIDR reference table at the bottom to jump directly to that prefix length.
Read the calculated values
The results table shows nine values simultaneously: Network Address (the first address in the subnet), Broadcast Address (the last address), First Usable IP (network + 1), Last Usable IP (broadcast - 1), Total Usable Hosts (2 to the power of (32 minus prefix) minus 2), Subnet Mask (dotted decimal), Wildcard Mask (inverse of subnet mask), CIDR Notation (network address with prefix), and IP Class (A, B, C, D for multicast, or E for reserved).
Features
Calculates network address, broadcast, first/last usable IP instantly
Host count, subnet mask, wildcard mask, and CIDR notation
Slider from /0 to /32 with live recalculation on drag
Clickable CIDR reference table with 16 common prefix lengths
IPv4 address validation with inline error message
IP class detection (A, B, C, D multicast, E reserved)
Copy button on every output row
Runs entirely in your browser using 32-bit bitwise arithmetic
Related Tools
Frequently Asked Questions
What does /24 mean in CIDR notation?
The /24 (pronounced slash twenty-four) means the first 24 bits of the IP address are the network identifier and the remaining 8 bits identify individual hosts within that network. A /24 subnet has a subnet mask of 255.255.255.0, contains 256 total addresses, and provides 254 usable host addresses (subtracting the network address and broadcast address).
How many hosts does a /28 subnet support?
A /28 subnet has 32 - 28 = 4 bits for host addressing. That gives 2 to the power of 4 = 16 total addresses, minus 2 for the network and broadcast addresses, leaving 14 usable host addresses. /28 is commonly used for small subnets in cloud environments where you need only a handful of addresses for a specific service tier.
What is the difference between the subnet mask and the wildcard mask?
The subnet mask has 1 bits for network bits and 0 bits for host bits. The wildcard mask is the bitwise inverse — 0 bits for network bits and 1 bits for host bits. Subnet masks are used in routing tables and interface configuration. Wildcard masks are used in Cisco access control lists (ACLs) and OSPF network statements to specify which bits must match.
How do I calculate the CIDR block I need for AWS VPC?
Determine how many hosts you need. Add capacity for AWS reserved addresses (AWS reserves 5 IP addresses per subnet: network, router, DNS, future use, and broadcast). Round up to the next power of 2 and find the CIDR prefix. For example, if you need 100 hosts plus 5 reserved = 105, the next power of 2 is 128, which is a /25 (128 - 2 = 126 usable). Use a /24 for comfortable room to grow.
What is the difference between a /30 and a /31 subnet?
A /30 subnet has 4 addresses total: network, broadcast, and 2 usable host addresses. It is the traditional choice for point-to-point links. A /31 subnet (RFC 3021) has only 2 addresses with no network or broadcast address, giving exactly 2 usable addresses for a point-to-point link with no wasted addresses. Modern routers support /31 for more efficient address allocation on router interconnects.