CIDR Calculator — Free Online Tool

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).
  • Configuring cloud networks (AWS VPC, Azure VNet, GCP VPC) with CIDR blocks.
  • Setting firewall rules or security groups (allow/deny specific CIDR ranges).
  • Learning subnetting for networking certifications (CCNA, CompTIA Network+, AWS Solutions Architect).
  • 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.

  1. 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).
  2. Calculate subnet details: Tool computes: network address, broadcast address (IPv4 only), subnet mask, usable IP range, total hosts, usable hosts, wildcard mask.
  3. 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.
  4. 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.
  5. 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).
  6. View host count: Total hosts = 2^(32 - prefix). Usable = total - 2. Example: /24 = 256 total, 254 usable. /32 = 1 total, 0 usable (single host).
  7. Copy results: Copy network address, subnet mask, or CIDR notation for documentation, configuration files, or scripts.

Key features

  • IPv4 and IPv6 support: IPv4: 192.168.0.0/24. IPv6: 2001:db8::/32. Different calculations due to address length (32-bit vs 128-bit).
  • Complete subnet details: Network address, broadcast (IPv4), subnet mask, usable range, host count, wildcard mask, binary representation.
  • CIDR to subnet mask: Convert /24 → 255.255.255.0, /16 → 255.255.0.0, /8 → 255.0.0.0. Or reverse: 255.255.255.0 → /24.
  • Host count calculator: Total hosts = 2^(32 - prefix). Usable hosts = total - 2 (exclude network, broadcast). Example: /24 = 254 usable.
  • 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).

Examples

CIDR calculation examples.

Home network (192.168.1.0/24)

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 - 192.168.1.254
Total hosts: 256
Usable hosts: 254

Common home router default. 254 usable IPs for devices.

AWS VPC (10.0.0.0/16)

10.0.0.0/16
Network: 10.0.0.0
Broadcast: 10.0.255.255
Subnet mask: 255.255.0.0
Usable: 10.0.0.1 - 10.0.255.254
Total hosts: 65,536
Usable hosts: 65,534

Large VPC. Divide into 256 /24 subnets (one per availability zone or tier).

Single host (192.168.1.10/32)

192.168.1.10/32
Network: 192.168.1.10
Broadcast: 192.168.1.10
Subnet mask: 255.255.255.255
Usable: none
Total hosts: 1
Usable hosts: 0

/32 = single IP. Used for host-specific firewall rules or routing.

Enterprise network (10.0.0.0/8)

10.0.0.0/8
Network: 10.0.0.0
Broadcast: 10.255.255.255
Subnet mask: 255.0.0.0
Usable: 10.0.0.1 - 10.255.255.254
Total hosts: 16,777,216
Usable hosts: 16,777,214

Largest private range (RFC 1918). 16.7M IPs for large enterprises.

IPv6 subnet (2001:db8::/32)

2001:db8::/32
Network: 2001:db8::
Prefix: /32
Total addresses: 2^96 (79,228,162,514,264,337,593,543,950,336)

IPv6: no broadcast. Allocate /48 per site, /64 per subnet. 2^96 addresses available.

Technical reference

CIDR and subnetting specifications:

CIDR notation
IP/prefix: 192.168.1.0/24. Prefix = number of network bits (24 of 32). Remaining bits = host bits (8 of 32). Classless (replaces Class A/B/C).
Prefix length
IPv4: /0 (all IPs) to /32 (single IP). Common: /8 (16M IPs), /16 (65K IPs), /24 (256 IPs), /32 (1 IP). IPv6: /0 to /128. Common: /32 (ISP), /48 (site), /64 (subnet).
Subnet mask
Dotted decimal format. /24 = 255.255.255.0, /16 = 255.255.0.0, /8 = 255.0.0.0. Network bits = 1, host bits = 0 (in binary).
Wildcard mask
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.
Host count formula
Total hosts = 2^(32 - prefix). Usable hosts = total - 2 (exclude network, broadcast). Example: /24 = 2^8 = 256 total, 254 usable. /32 = 1 total, 0 usable.
Private IP ranges (RFC 1918)
10.0.0.0/8 (10.0.0.0 - 10.255.255.255, 16M IPs), 172.16.0.0/12 (172.16.0.0 - 172.31.255.255, 1M IPs), 192.168.0.0/16 (192.168.0.0 - 192.168.255.255, 65K IPs). Used for internal networks.
IPv6 differences
128-bit addresses (vs 32-bit IPv4). No broadcast (multicast instead). No NAT needed (globally unique). Prefix notation similar: 2001:db8::/32. Common: /48 (site), /64 (subnet).

Common mistakes to avoid

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).

Frequently asked questions

What does /24 mean in CIDR notation?

/24 = 24 network bits (of 32 total). Subnet mask: 255.255.255.0. 8 host bits = 2^8 = 256 total IPs, 254 usable. Example: 192.168.1.0/24.

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.

How many usable IPs in /24, /16, /8?

/24 = 254 usable (256 total - 2). /16 = 65,534 usable. /8 = 16,777,214 usable. /32 = 0 usable (single host).

What are private IP ranges?

10.0.0.0/8 (16M IPs), 172.16.0.0/12 (1M IPs), 192.168.0.0/16 (65K IPs). RFC 1918 private ranges. Used for internal networks (not routable on Internet).

How does IPv6 subnetting differ from IPv4?

IPv6: 128-bit (vs 32-bit). No broadcast (multicast instead). Common: /48 (site), /64 (subnet). 2^64 hosts per /64 (18 quintillion). No NAT needed (globally unique).

References

Privacy and availability

  • Runs entirely in your browser — zero server processing
  • No signup or account required
  • Works offline once loaded
  • Fast, lightweight, no external dependencies
  • Available as a browser extension for Chrome and Firefox