CIDR / Subnet Calculator
Enter an IPv4 CIDR block (like 10.0.4.0/22) and get the full subnet breakdown: network address, broadcast address, subnet mask, wildcard mask, host range, and number of usable hosts. Also accepts a bare IP address (treated as /32). Essential for network configuration, firewall rules, and cloud infrastructure setup.

What it does
- ▸Computes network address, broadcast address, and subnet mask from a CIDR
- ▸Shows the wildcard mask (inverse of subnet mask, used in Cisco ACLs)
- ▸Calculates the host range (first usable to last usable host)
- ▸Shows the number of usable hosts (2^(32-prefix) - 2, or 1 for /31, 1 for /32)
- ▸Handles all prefix lengths from /0 to /32
- ▸Accepts bare IPs (treated as /32)
Use cases
- ▸Calculating the host range for a VPC subnet in AWS, GCP, or Azure
- ▸Setting up firewall rules with the correct network and broadcast addresses
- ▸Determining if two IPs are in the same subnet
- ▸Planning IP address allocation for a network
How it works
Enter an IPv4 CIDR block (e.g., 10.0.4.0/22) or a bare IP into the input
The tool computes the network address, broadcast, mask, and host range
All values are displayed in the output fields
Copy the values you need for your configuration
Frequently asked questions
1What does /22 mean?
The /22 prefix means the first 22 bits of the IP address are the network portion, and the last 10 bits are the host portion. This gives 2^10 = 1024 addresses (1022 usable hosts). A /24 has 256 addresses (254 usable), a /16 has 65,536 (65,534 usable).
2What's the wildcard mask?
The wildcard mask is the inverse of the subnet mask. For a /24 (mask 255.255.255.0), the wildcard is 0.0.0.255. It's used in Cisco ACLs and OSPF configuration: access-list 1 permit 10.0.0.0 0.0.0.255.
3Why are there 2 fewer usable hosts than total addresses?
The first address (network address) and last address (broadcast address) are reserved and can't be assigned to hosts. For a /24, that's 256 - 2 = 254 usable. For /31 and /32, special rules apply (RFC 3021).
Related tools

Chmod Calculator
Convert between octal and symbolic unix file permissions

Number Base Converter
Convert numbers between binary, octal, decimal, hex and any base 2–36

DNS Record Explainer
Parse and explain DNS zone file records — A, AAAA, CNAME, MX, TXT, SRV, NS, SOA, CAA, PTR with security checks

HTTP Header Analyzer
Parse HTTP headers, explain their purpose, and flag missing security headers
Use CIDR / Subnet Calculator offline in Devinity
All 95 tools run locally on your Mac. No internet required, no data sent to servers.
Download Devinity →