CIDR / Subnet Calculator — Free Online IP Subnet Calculator
Calculate CIDR notation, subnet masks, network/broadcast addresses, host ranges, and binary representations. Split networks into subnets or aggregate CIDRs into supernets. Supports both IPv4 and IPv6. 100% client-side — nothing is sent to any server.
How to Use the CIDR / Subnet Calculator
- IPv4 Tab: Enter an IP address with CIDR prefix (e.g.,
10.0.0.0/8) to see all network details instantly. - IPv6 Tab: Enter an IPv6 CIDR (e.g.,
2001:db8::/32) for basic IPv6 network information. - Supernet Aggregation: Paste multiple CIDRs (one per line) to find the smallest supernet that contains them all.
- Subnet Division: Split a CIDR block into smaller equal-size subnets by choosing a new prefix length.
- Common Subnets: Quick reference table for the most常用 CIDR blocks with subnet masks, host counts, and wildcard masks.
- Copy Results: Click "Copy Results" on any tab to copy all calculated information to your clipboard.
Understanding CIDR Notation
CIDR (Classless Inter-Domain Routing) replaces traditional classful addressing. An IP address in CIDR notation is written as IP/prefix_length, where the prefix length indicates how many bits represent the network portion.
For example, 192.168.1.0/24 means the first 24 bits (out of 32) are the network portion, leaving 8 bits for host addresses. This gives 256 total addresses (2^8), with 254 usable hosts (subtracting network and broadcast addresses).
CIDR allows subnetting to any bit boundary — not just /8, /16, or /24 — making IP address allocation far more efficient than the old classful system.
Frequently Asked Questions
A /24 subnet has 256 addresses (254 usable hosts), while a /25 has 128 addresses (126 usable hosts). The /25 splits the /24 network into two equal halves, each with half the addresses.
Supernetting (or CIDR aggregation) combines multiple smaller networks into a larger one. The tool finds the smallest single CIDR block that contains all your entered networks — useful for route summarization in BGP and reducing routing table sizes.
A wildcard mask is the inverse of a subnet mask — it has 0s where the subnet mask has 1s. It's commonly used in Cisco ACLs (Access Control Lists) and OSPF wildcard matching to specify which bits of an IP address must match.
/32 is a single host address (point-to-point). /31 is used for point-to-point links and has exactly 2 addresses with no network or broadcast — both are usable. /30 is the traditional point-to-point subnet size with 2 usable hosts out of 4.
Private IPv4 ranges are: 10.0.0.0/8 (10.x.x.x), 172.16.0.0/12 (172.16.x.x – 172.31.x.x), and 192.168.0.0/16 (192.168.x.x). The calculator automatically detects and labels these.
IPv6 uses 128-bit addresses written as 8 groups of 4 hex digits separated by colons. CIDR notation works the same way — e.g., 2001:db8::/32 means the first 32 bits are the network prefix. Most IPv6 allocations use /48 or /64 prefixes.
Use Cases
Cloud Infrastructure Planning
Plan subnets for AWS VPCs, Azure virtual networks, and Google Cloud deployments with proper CIDR block allocation.
VPC CIDR Allocation
Allocate non-overlapping CIDR blocks for VPCs and subnets to ensure proper network segmentation in cloud environments.
Network Troubleshooting
Debug network connectivity issues by calculating subnet ranges, broadcast addresses, and valid host IP ranges.
Firewall Rule Configuration
Calculate wildcard masks and IP ranges for configuring firewall rules, ACLs, and security group configurations.
IPv6 Prefix Planning
Plan IPv6 prefix allocations for enterprise networks, ISP deployments, and dual-stack infrastructure migrations.