Subnet / CIDR Calculator
Enter an IP and CIDR prefix to instantly calculate all subnet details including network address, broadcast, subnet mask, and usable host range.
All calculations happen in your browser
How to use Subnet / CIDR Calculator
The Subnet Calculator turns an IP address and prefix length or netmask into every value you need to plan a network: the network address, broadcast address, usable host range, total and usable host counts, and wildcard mask. Subnetting by hand means converting between binary and decimal and is easy to get wrong, so this tool does the bit-level arithmetic instantly. Whether you are carving a /16 into department-sized subnets, sizing a VPC, or writing a firewall rule that needs a CIDR block, the calculator gives you exact, copy-ready answers.
- Enter an IPv4 address (for example 192.168.1.0).
- Enter the prefix length in CIDR form (such as /24) or a netmask.
- Click Calculate to compute the subnet’s key addresses and counts.
- Read the network, broadcast, first and last usable host addresses.
- Copy the CIDR or host range into your router, firewall or cloud config.
Your data never leaves your device — 100% private processing.
How CIDR prefixes map to host counts
A CIDR prefix tells you how many bits are fixed for the network, leaving the rest for hosts. A /24 fixes 24 bits and leaves 8 for hosts, giving 256 addresses of which 254 are usable after reserving the network and broadcast addresses. Each step toward a smaller prefix doubles the address space: a /23 holds 512, a /22 holds 1024. Working the other way, larger prefixes carve a block into smaller pieces — a /25 splits a /24 into two halves. Memorising a few common sizes makes capacity planning fast.
| CIDR | Netmask | Usable hosts |
|---|---|---|
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /24 | 255.255.255.0 | 254 |
| /16 | 255.255.0.0 | 65,534 |
Network, broadcast and usable range
Within any subnet the first address is the network identifier and the last is the broadcast address; neither can be assigned to a host, which is why usable hosts are always two fewer than the total. The addresses in between form the usable range you assign to devices. Firewalls and cloud security groups, however, often expect the whole block in CIDR notation rather than a host range, so this tool reports both forms. Getting the network and broadcast boundaries right prevents address conflicts and routing problems.
Glossary
- Subnet
- A logical subdivision of an IP network sharing a common routing prefix.
- CIDR
- Classless Inter-Domain Routing notation, e.g. /24, expressing the network prefix length.
- Netmask
- A 32-bit mask separating the network and host portions of an address.
- Broadcast address
- The last address in a subnet, reserved to reach all hosts at once.
- Wildcard mask
- The inverse of a netmask, used in some firewall and routing rules.
Related reading
Frequently Asked Questions
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Why use Subnet / CIDR Calculator?
- Real-time DNS lookups using live resolver queries
- Supports IPv4 and IPv6 addresses
- No software to install — runs entirely in the browser
- Results include TTL values and record priority
Common use cases
- Verify DNS propagation after updating nameservers
- Check MX records when troubleshooting email delivery
- Look up SPF/DKIM/DMARC records for email security audits
- Test whether a SSL certificate is valid and up to date
- Find the IP address behind a domain name
Related Network & DNS
IP Address Converter
Convert IPv4 addresses to decimal, binary, and hexadecimal formats. Also convert decimal numbers back to IP addresses. Free online IP converter.
SPF Record Generator
Generate SPF DNS TXT records for your domain. Support for Google Workspace, Microsoft 365, SendGrid, Mailchimp, custom IPs and includes.
DNS Lookup Tool
Look up DNS records for any domain — A, AAAA, MX, NS, TXT, CNAME, SOA, and CAA records. Free, instant results pulled from authoritative nameservers.
DNS Propagation Checker
Check if your DNS changes have propagated worldwide. Test A, MX, and NS records across 8 global DNS servers to confirm updates are live everywhere.
What Is My IP Address?
Instantly find your public IP address. Shows your IPv4 address as seen by websites and servers, plus quick details about your connection.
HTTP Headers Checker
View HTTP response headers for any URL. Check status codes, security headers, caching, redirects, and server details instantly. Free and private.
Explore all Network & DNS.