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.
Worked examples
/24 network
Inputs: 192.168.1.0/24
Result: 256 addresses · 254 usable hosts · mask 255.255.255.0
/26 subnet
Inputs: 10.0.0.0/26
Result: 64 addresses · 62 usable hosts · mask 255.255.255.192
/30 point-to-point
Inputs: 172.16.0.0/30
Result: 4 addresses · 2 usable hosts · mask 255.255.255.252
Common CIDR prefixes and capacity
| Prefix | Total addresses | Usable hosts | Typical use |
|---|---|---|---|
| /8 | 16,777,216 | 16,777,214 | Very large private block (10.0.0.0/8) |
| /16 | 65,536 | 65,534 | Large campus network |
| /24 | 256 | 254 | Standard LAN segment |
| /26 | 64 | 62 | Small department subnet |
| /30 | 4 | 2 | Point-to-point link |
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
Why use Subnet / CIDR Calculator?
- Compute network address, broadcast, host range and usable host count from a CIDR block
- Eliminate manual binary conversion errors when planning subnets
- Output both CIDR notation and subnet mask form ready for firewall rules
- Plan address allocation for VPCs and on-premises networks with exact figures
Common use cases
- Calculate how many usable hosts fit in a /27 subnet before assigning devices
- Determine the broadcast address of a subnet when writing a firewall allow rule
- Divide a corporate /16 into department-sized blocks with no address waste
- Size a VPC subnet to fit a known number of instances with room to scale
- Verify two subnets do not overlap before deploying them in the same network
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
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.