IPv4 CIDR & Subnet Calculator
Calculate subnet masks, network addresses, broadcast IPs, usable host ranges, and binary bitmasks.
IPv4 Address & CIDR Prefix
Subnet Calculation Results
Click any value to copy| Network Address: | — |
|---|---|
| Broadcast Address: | — |
| Usable Host Range: | — |
| Subnet Mask: | — |
| Wildcard Mask: | — |
| Total IP Addresses: | — |
| Usable Hosts: | — |
| IP Scope & Class: |
32-Bit Binary Breakdown
How to use the CIDR Subnet Calculator
- Enter an IPv4 address and CIDR prefix (e.g. 192.168.1.0/24 or 10.0.0.0/16) or pick a subnet mask from the dropdown.
- Inspect the calculated network address, broadcast address, netmask, wildcard mask, and usable host IP range.
- Review the total address count, usable host count, and 32-bit binary representation showing network bits versus host bits.
- Click any IP or mask to copy it to your clipboard for routing tables, firewalls, or VPC configurations.
What is CIDR and how does subnetting work?
Classless Inter-Domain Routing (CIDR) is the standard method used to allocate IP addresses and route IP packets across the global internet and local computer networks. Before CIDR was introduced in 1993, IPv4 networks were divided into rigid classes: Class A (/8, supporting 16 million hosts), Class B (/16, supporting 65,534 hosts), and Class C (/24, supporting 254 hosts). This inflexible system wasted vast blocks of address space.
CIDR replaced fixed classes with variable-length subnet masking (VLSM). In CIDR notation (such as 192.168.1.0/24 or 10.0.0.0/16), the number following the forward slash denotes the exact number of leading bits assigned to the network prefix. The remaining bits ($32 - \text{prefix}$) are available for assigning to individual host interfaces.
How subnet calculations work
An IPv4 address consists of 32 binary bits, divided into four 8-bit octets separated by dots. When calculating network boundaries:
- Subnet Mask: Created by setting the first $N$ bits to
1and the remaining bits to0. For a/24network, 24 ones followed by 8 zeros produces255.255.255.0. - Network Address: Calculated by performing a bitwise logical
ANDoperation between the IP address and the subnet mask. This identifies the base address of the subnet. - Broadcast Address: Calculated by performing a bitwise logical
ORbetween the IP address and the inverted subnet mask (wildcard mask). Packets sent to this address reach every device on the subnet. - Usable Host Range: The IP addresses between the network address and broadcast address. For a
/24network (256 total IPs), usable hosts span from.1to.254(254 usable hosts). - Wildcard Mask: The bitwise inverse of the subnet mask, heavily used in Cisco Access Control Lists (ACLs) and firewall rule definitions.
RFC 1918 Private IPv4 address blocks
To preserve public IPv4 addresses, the Internet Engineering Task Force (IETF) and IANA reserved three private address blocks under RFC 1918 that routers never forward onto the public internet:
- 10.0.0.0/8: $10.0.0.0$ to $10.255.255.255$ ($16,777,216$ addresses). Standard for large enterprise networks and Amazon Web Services (AWS) VPCs.
- 172.16.0.0/12: $172.16.0.0$ to $172.31.255.255$ ($1,048,576$ addresses). Commonly used by Docker bridge networks and corporate VPNs.
- 192.168.0.0/16: $192.168.0.0$ to $192.168.255.255$ ($65,536$ addresses). Ubiquitous across home Wi-Fi routers and small office LANs.
Subnetting in cloud architecture (AWS, GCP, Azure)
When creating a Virtual Private Cloud (VPC) in AWS, Azure, or Google Cloud Platform, careful subnet planning avoids address exhaustion. AWS reserves 5 IP addresses in every subnet (the network address, VPC router, DNS resolver, future use, and broadcast address). Using this CIDR calculator ensures you allocate adequate host capacity for auto-scaling server pools, container clusters, and database clusters.
Frequently asked questions
What does CIDR notation mean?
192.168.1.0/24). The number after the slash indicates how many leading bits in the 32-bit IPv4 address belong to the network prefix.Why are two IP addresses subtracted from the usable host count?
/24 subnet (256 total IPs), there are 256 - 2 = 254 usable host IPs.What are RFC 1918 private IP address ranges?
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.What is a wildcard mask?
255.255.255.0 netmask (/24) has a wildcard mask of 0.0.0.255.What are /31 and /32 subnets used for?
/31 subnet (RFC 3021) has only two addresses and is used for point-to-point links between routers without dedicated network or broadcast addresses. A /32 subnet represents a single host route (only one IP address).Last updated . Launched with IPv4 network calculations, binary bitmask breakdown, RFC 1918 classification, and subnet mask picker.
Need live IP geolocation, ASN, or blacklist intelligence?
ProWebLook IP API detects real-time city, country, ISP, autonomous system (ASN), VPN/proxy status, and fraud scores with sub-millisecond response times.