Calculate CIDR subnets, IP ranges, netmasks. IPv4 and IPv6. Shows network address, broadcast, usable IPs, wildcard mask. Subnet planning tool.
Use this free online CIDR Calculator directly in your browser. No signup required, no data leaves your device. Part of Utilier — a collection of 133+ developer utilities.
What is CIDR Calculator & Subnet Calculator (IPv4, IPv6)?
CIDR (Classless Inter-Domain Routing) calculator computes IP address ranges, subnet masks, and network details from CIDR notation (e.g., 192.168.1.0/24). Enter IP/CIDR → tool calculates: network address (192.168.1.0), broadcast address (192.168.1.255), subnet mask (255.255.255.0), usable IP range (192.168.1.1 - 192.168.1.254), total hosts (256), usable hosts (254), wildcard mask (0.0.0.255). Supports IPv4 (192.168.0.0/16) and IPv6 (2001:db8::/32). Useful for network planning (subnet design), firewall rules (allow 10.0.0.0/8), cloud security groups (AWS, Azure), or understanding network addressing (subnetting practice).
CIDR notation: IP/prefix length format: 192.168.1.0/24 (/24 = 24 bits for network, 8 bits for hosts). Replaces old class-based addressing (Class A, B, C).
Subnet calculations: Network address (first IP, all host bits 0), broadcast address (last IP, all host bits 1), usable range (network + 1 to broadcast - 1), subnet mask (255.255.255.0), wildcard mask (inverse of subnet mask).
Host count: Total hosts = 2^(32 - prefix). Example: /24 = 2^8 = 256 total IPs. Usable hosts = total - 2 (exclude network and broadcast). /24 = 254 usable.
IPv4 and IPv6: IPv4: 32-bit addresses (192.168.0.0), prefixes /8 to /32. IPv6: 128-bit addresses (2001:db8::), prefixes /32 to /128. Different calculations due to address length.
Subnet planning: Divide large network into smaller subnets. Example: 10.0.0.0/8 → split into /16 subnets (256 subnets, each with 65,536 IPs).
Why use CIDR calculator?
Manual subnet calculations are error-prone (binary arithmetic, address conversions). This tool computes all values instantly and accurately.
Avoid calculation errors: Converting 192.168.1.0/24 to subnet mask (255.255.255.0), broadcast (192.168.1.255), usable range manually is tedious. Tool does it instantly.
Network planning: Design subnets for office networks, data centers, or cloud VPCs (AWS, Azure). Example: divide 10.0.0.0/16 into /24 subnets for each department.
Firewall and security groups: Configure firewall rules (allow 10.0.0.0/8), AWS security groups (source: 192.168.1.0/24), or Azure NSGs. Tool shows exact IP range affected.
Understand CIDR notation: Learn what /24, /16, /8 mean. See how prefix length affects number of hosts. Great for networking students or certification prep (CCNA, AWS).
IPv6 subnetting: IPv6 addresses are 128-bit (vs 32-bit IPv4). Manual calculation is nearly impossible. Tool handles IPv6 CIDR (2001:db8::/32).
Validate configuration: Check if IP address is within subnet. Example: is 192.168.1.50 in 192.168.1.0/24? Tool shows usable range (yes, 192.168.1.1-254).
When to use CIDR calculator
Use whenever you need to calculate subnet details from CIDR notation.
Designing office or data center networks (subnet planning, IP allocation).
Validating IP addresses are within subnet (is 10.0.1.50 in 10.0.0.0/16?).
Converting between CIDR notation and subnet mask (192.168.0.0/24 = 255.255.255.0).
IPv6 address planning (allocate /64 subnets for each VLAN or customer).
How to use CIDR calculator
Enter IP/CIDR notation, view subnet details.
Enter IP and prefix: Type IP address and prefix length: 192.168.1.0/24 (IPv4) or 2001:db8::/32 (IPv6). Or enter IP and subnet mask separately (192.168.1.0, 255.255.255.0).
View network address: First IP in subnet (all host bits set to 0). Example: 192.168.1.0/24 → network = 192.168.1.0. Cannot be assigned to hosts.
View broadcast address: Last IP in subnet (all host bits set to 1). Example: 192.168.1.0/24 → broadcast = 192.168.1.255. Cannot be assigned to hosts. IPv6 has no broadcast.
Check usable range: Network + 1 to Broadcast - 1. Example: 192.168.1.0/24 → usable = 192.168.1.1 to 192.168.1.254 (254 IPs).
Wildcard mask: Inverse of subnet mask. Used in Cisco ACLs. Example: subnet mask 255.255.255.0 → wildcard 0.0.0.255.
Binary representation: Show IP and subnet mask in binary (32 bits). Helps understand how subnetting works (network vs host bits).
Subnet planning: Divide network into smaller subnets. Example: 10.0.0.0/8 → how many /16 subnets? 256 subnets.
Common use cases
Home network (192.168.1.0/24): Network: 192.168.1.0, Broadcast: 192.168.1.255, Subnet mask: 255.255.255.0, Usable: 192.168.1.1-254 (254 IPs). Common home router default.
AWS VPC (10.0.0.0/16): Network: 10.0.0.0, Usable: 10.0.0.1 - 10.0.255.254 (65,534 IPs). Divide into /24 subnets for each tier (web, app, db). 256 /24 subnets available.
Private network (10.0.0.0/8): Network: 10.0.0.0, Usable: 10.0.0.1 - 10.255.255.254 (16,777,214 IPs). Largest private range (RFC 1918). Used by enterprises for internal networks.
Single host (/32): 192.168.1.10/32 → network = 192.168.1.10, broadcast = 192.168.1.10, usable = 0 (single IP, no range). Used for host-specific firewall rules.
IPv6 subnet (2001:db8::/32): 2^96 addresses (340 undecillion IPs). Allocate /48 per site, /64 per VLAN. IPv6 has no broadcast (uses multicast instead).
Firewall rule (allow 10.0.0.0/8): Allow all IPs from 10.0.0.0 to 10.255.255.255 (16.7M IPs). Used in firewall or security group rules (AWS, Azure).
Inverse of subnet mask. Subnet mask 255.255.255.0 → wildcard 0.0.0.255. Used in Cisco ACLs (Access Control Lists). 0 = must match, 255 = don't care.
Network address
First IP in subnet (all host bits = 0). Example: 192.168.1.0/24 → network = 192.168.1.0. Cannot be assigned to hosts.
Broadcast address
Last IP in subnet (all host bits = 1). Example: 192.168.1.0/24 → broadcast = 192.168.1.255. Cannot be assigned to hosts. IPv6 has no broadcast (multicast instead).
Usable IP range
Network + 1 to Broadcast - 1. Example: 192.168.1.0/24 → 192.168.1.1 to 192.168.1.254 (254 usable IPs). Assign to hosts, routers, servers.
Assigning network or broadcast address to hosts (e.g., 192.168.1.0 or 192.168.1.255 in /24)
Why it happens: Network address (192.168.1.0) identifies subnet, broadcast (192.168.1.255) sends to all hosts. Assigning these to hosts breaks networking (routing conflicts, broadcast storms). Common when manually configuring IPs.
How to avoid it: Use usable range only (192.168.1.1 - 192.168.1.254 for /24). Never assign network (first IP) or broadcast (last IP). Tool shows usable range.
Confusing subnet mask and wildcard mask in Cisco ACLs
Why it happens: Subnet mask: 255.255.255.0 (network bits = 1). Wildcard mask: 0.0.0.255 (network bits = 0). Using subnet mask in ACL = wrong matching. Common when copying firewall rules.
How to avoid it: Cisco ACLs use wildcard mask (inverse of subnet). Subnet mask 255.255.255.0 → wildcard 0.0.0.255. Or use 'any' (wildcard 255.255.255.255 = match all).
Overlapping subnets in network design (10.0.0.0/24 and 10.0.0.128/25)
Why it happens: 10.0.0.0/24 covers 10.0.0.0 - 10.0.0.255. 10.0.0.128/25 covers 10.0.0.128 - 10.0.0.255 (subset of /24). Overlapping subnets cause routing conflicts (which route to use?).
How to avoid it: Use non-overlapping subnets. Example: 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24 (no overlap). Or split 10.0.0.0/24 into 10.0.0.0/25 and 10.0.0.128/25 (no overlap).
Forgetting to exclude network and broadcast when counting usable hosts
Why it happens: /24 = 2^8 = 256 total IPs. But only 254 usable (exclude network .0 and broadcast .255). Allocating 256 hosts to /24 = 2 hosts fail (no IP available).
How to avoid it: Usable hosts = total - 2. /24 = 254 usable, /25 = 126 usable, /32 = 0 usable. Plan network size accordingly.
Using public IP ranges (e.g., 8.8.8.0/24) for private networks
Why it happens: 8.8.8.0/24 is public (Google DNS). Using public IPs internally causes routing conflicts (Internet vs internal). Common when copying examples or misunderstanding RFC 1918.
How to avoid it: Use private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 (RFC 1918). These are non-routable on Internet (safe for internal use).
What is the difference between network address and usable IP range?
Network address = first IP (e.g., 192.168.1.0), identifies subnet, cannot be assigned. Usable range = network + 1 to broadcast - 1 (192.168.1.1-254), assign to hosts.
How do I convert subnet mask to CIDR prefix?
Count 1s in binary. 255.255.255.0 = 11111111.11111111.11111111.00000000 = 24 ones = /24. Or use tool: 255.255.0.0 = /16, 255.0.0.0 = /8.
What is a wildcard mask?
Inverse of subnet mask. Used in Cisco ACLs. Subnet mask 255.255.255.0 → wildcard 0.0.0.255. 0 = must match, 255 = don't care.