Subnet Calculator

Calculate IPv4 CIDR prefixes, subnet masks, usable host address ranges, broadcast addresses, wildcard masks, and binary network bits.

IPv4 & Subnet Mask Configuration
e.g. 10.0.0.1, 172.16.0.1, 192.168.1.50
Choose CIDR bit length (e.g. /24, /16, /8)
Network Address (CIDR)
192.168.1.0/24

Base routing destination

Usable Host Capacity
254

256 total addresses

Subnet Mask
255.255.255.0

Wildcard: 0.0.0.255

Address Classification
Class C (/24)

Private (RFC 1918 Class C)

Comprehensive Network Parameters
Usable Host Range:192.168.1.1 - 192.168.1.254
Broadcast Address:192.168.1.255
Subnet Mask Binary:11111111.11111111.11111111.00000000
IP Address Binary:11000000.10101000.00000001.00000001
Network Type:Private (RFC 1918 Class C)

How Subnetting & CIDR Calculation Works

An IPv4 address consists of 32 bits divided into four 8-bit octets. A subnet mask dictates which portion of the 32 bits identifies the network and which portion identifies individual host interfaces on that network.

Common Subnet Reference Table

CIDRSubnet MaskTotal IPsUsable Hosts
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/24255.255.255.0256254
/28255.255.255.2401614
/30255.255.255.25242

Network Engineering Use Cases

  • Cloud VPC Architecture (AWS, GCP, Azure)

    Design non-overlapping CIDR blocks (/16, /20, /24) for public, private, and database subnets across multi-region VPC topologies.

  • Enterprise LAN & VLAN Segmentation

    Carve up corporate Class A (10.0.0.0/8) or Class C (192.168.0.0/16) spaces into secure department VLANs (Engineering, Guest Wi-Fi, IoT).

  • Router & Firewall Access Control Lists (ACLs)

    Determine exact wildcard masks (e.g. 0.0.0.255) needed for Cisco, Juniper, and pfSense firewall filter rules.

  • DevOps Kubernetes & Docker Pod Networking

    Assign container pod IP pools and cluster service CIDRs without exhausting node addresses or colliding with host networks.

Why Use This Subnet Tool

Full CIDR Range Support (/0 to /32)

Calculate everything from the default internet route (/0) to individual host IP route endpoints (/32).

Automatic Class & RFC Detection

Instantly flags whether an IP is RFC 1918 Private, Loopback (127.0.0.1), Link-Local (169.254.x.x), or Public routable.

Binary Octet Visualization

Inspect 32-bit binary representations of both the IP and subnet mask to easily visualize network vs host bits.

One-Click Configuration Copy

Copy all network parameters in clean ASCII format directly to your clipboard for terminal scripts and documentation.

Frequently Asked Questions

What is an IPv4 Subnet and why is subnetting used?

Subnetting is the practice of dividing a larger physical IP network into smaller logical subnetworks (subnets). It improves network routing efficiency, enhances security by isolating segments, and reduces broadcast domain congestion.

What does CIDR notation (e.g. /24) mean?

Classless Inter-Domain Routing (CIDR) notation specifies how many contiguous leading bits of a 32-bit IPv4 address represent the network prefix. For example, /24 means the first 24 bits are the network address (255.255.255.0), leaving the remaining 8 bits for 256 total IP addresses (254 usable hosts).

Why are there 2 fewer usable hosts than total IP addresses?

In standard IPv4 subnets, the very first address in the block is reserved as the Network Identifier, and the very last address is reserved as the Broadcast Address for all hosts on the subnet. Therefore, usable hosts = 2^(32 - prefix) - 2.

What are the RFC 1918 private IP address ranges?

RFC 1918 reserves three address blocks for private internal networks: 10.0.0.0/8 (10.0.0.0 – 10.255.255.255), 172.16.0.0/12 (172.16.0.0 – 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 – 192.168.255.255). These addresses cannot be routed across the public internet.

What is a wildcard mask?

A wildcard mask is the inverted binary complement of a subnet mask (calculated as 255.255.255.255 minus the subnet mask). For instance, a /24 subnet (255.255.255.0) has a wildcard mask of 0.0.0.255. It is used in Cisco IOS Access Control Lists (ACLs) and OSPF routing protocols.

ARCADE BRAIN BREAK

Need a Brain Break? ☕

Done working on your task? Take a quick 60-second break, test your reflexes, and flap through infinite pixel obstacles in Sky Flap!

Instant Browser Play High Score Tracker