IPv4 CIDR Calculator
Calculate network address, broadcast address, subnet mask, wildcard mask, and usable host range from CIDR notation.
How do I use IPv4 CIDR Calculator?
Enter an IPv4 address (e.g., `192.168.1.0`) and select a CIDR prefix length (`/1` to `/32`), or click 'Sample (192.168.1.0/24)'.
Inspect the computed Network Address, Broadcast Address, Subnet Mask, Wildcard Mask, and First/Last Usable Host IP.
Copy any subnet parameter for your AWS VPC, Kubernetes cluster, Terraform, or firewall configuration.
What features does IPv4 CIDR Calculator offer?
Instant bitwise IPv4 network calculation
Subnet Mask, Wildcard Mask, Network & Broadcast IP computation
Usable Host IP range and total host capacity calculation
Binary Netmask representation and IP class identification
RFC 4632 Classless Inter-Domain Routing (CIDR) & RFC 1918 Subnet Reference
An IPv4 CIDR block `/N` locks the leading $N$ bits of the 32-bit address as the network prefix, leaving $32 - N$ host bits ($2^{32-N} - 2$ usable host IPs for standard `/1`–`/30` subnets).
| CIDR Prefix | Dotted-Decimal Mask | Total IPs ($2^{32-N}$) | Usable Hosts (Standard / AWS VPC) |
|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 hosts (AWS VPC max block) |
| /24 | 255.255.255.0 | 256 | 254 standard / 251 in AWS VPC |
| /28 | 255.255.255.240 | 16 | 14 standard / 11 in AWS VPC (min subnet) |
| /30 & /31 | 255.255.255.252 / .254 | 4 / 2 | 2 hosts (/30) or 2 point-to-point RFC 3021 (/31) |
Frequently Asked Questions about IPv4 CIDR Calculator
Why does a standard CIDR subnet subtract 2 addresses from the total IP count ($2^{32-N} - 2$)?
In standard IPv4 routing (prefixes `/1` through `/30`), the very first address (all host bits `0`) is reserved as the Network Identifier, and the very last address (all host bits `1`) is reserved as the Directed Broadcast Address.
Why do AWS VPC, GCP, and Azure subnets provide 3 fewer usable IPs than standard CIDR math?
Cloud virtual networks reserve 5 IP addresses per subnet instead of 2: `.0` (Network), `.1` (VPC Router), `.2` (Cloud DNS), `.3` (Future use), and `.255` (Broadcast). Thus a `/24` in AWS yields $256 - 5 = 251$ usable IPs.
How do `/31` and `/32` CIDR blocks work if $2^{32-N} - 2$ is 0 or negative?
A `/32` (`255.255.255.255`) represents a single specific host route (1 usable IP). A `/31` (`255.255.255.254`) is defined by RFC 3021 for point-to-point router links with no broadcast traffic, yielding 2 usable IPs.
What are the RFC 1918 private IPv4 address ranges?
RFC 1918 reserves three non-routable private ranges for internal LANs and VPCs: `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`).
Explore Related Developer Tools
Number Base & Bitwise Converter
Convert between Binary, Octal, Decimal, Hexadecimal, and ASCII text. Compute bitwise AND, OR, XOR, NOT operations.
Universal Unit Converter
Convert Length, Mass, Temperature, Digital Data Storage (Bytes to Terabytes), and Speed units online.
REST API Tester
Send HTTP requests (GET, POST, PUT, DELETE) directly from your browser. View response body, headers, status codes, and timing. Export as cURL or Python. No install required.
.env File Editor
Visual editor for .env files — parse, validate, detect duplicate keys, mask secrets, and generate .env.example templates for Next.js, Django, Laravel, Rails, and more.
Cron Expression Generator
Build, validate, and understand cron expressions with human-readable descriptions and next runs.
cURL to Go (net/http) Converter
Convert cURL commands into idiomatic Golang net/http code (http.NewRequest, strings.NewReader, req.Header.Set) in your browser.