Skip to main content
ToolsHub

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.

Files never leave your browser

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.

  1. Enter an IPv4 address (for example 192.168.1.0).
  2. Enter the prefix length in CIDR form (such as /24) or a netmask.
  3. Click Calculate to compute the subnet’s key addresses and counts.
  4. Read the network, broadcast, first and last usable host addresses.
  5. 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.

Common IPv4 subnet sizes
CIDRNetmaskUsable hosts
/30255.255.255.2522
/29255.255.255.2486
/28255.255.255.24014
/24255.255.255.0254
/16255.255.0.065,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

Free · No spam

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

Explore all Network & DNS.