About this tool
Calculate network, broadcast, usable host range, subnet mask and wildcard mask from any IPv4 CIDR block.
This calculator expands any IPv4 CIDR block (RFC 4632) into its full subnet breakdown: network and broadcast addresses, first and last usable host, subnet mask, wildcard mask, and host count using 2^(32−prefix) − 2. It handles the special cases generic tools get wrong — /31 point-to-point links with two usable addresses per RFC 3021, /32 host routes, and /0 — and labels the block as RFC 1918 private, loopback, link-local, CGN, multicast or public. Built for network engineers, cloud architects and anyone carving up a VPC.
Open CIDR Subnet Calculator on AltFTool — it loads instantly in your browser.
Enter the values you already know.
Fine-tune the options to match your scenario.
Read the result and use it in your planning or reporting.
/31 returns 2 usable hosts per RFC 3021 and /32 returns a host route, instead of the naive minus-two formula going negative.
Every result shows the ACL-style inverse mask alongside the dotted netmask.
The block is identified as RFC 1918 private, loopback, link-local, carrier-grade NAT, multicast or public.
A /24 has 254 usable hosts, a /26 has 62, and a /30 has 2. The formula is 2^(32−prefix) − 2, subtracting the network and broadcast addresses. So /24 gives 256 − 2 = 254 and /26 gives 64 − 2 = 62.
RFC 3021 defines /31 for point-to-point links: with only two addresses in the block, both are assigned to the link endpoints and no broadcast address exists. The classic minus-two rule would give zero, which is why /31 is treated specially by this calculator and by modern router operating systems.
A wildcard mask is the bitwise inverse of the subnet mask, used in Cisco ACLs and OSPF network statements. For a /26 the subnet mask is 255.255.255.192 and the wildcard is 0.0.0.63 — 0 bits mean 'must match' and 1 bits mean 'don't care'.
AND the address with the subnet mask to get the network address, then OR the network with the inverted mask to get the broadcast. For 192.168.1.130/26: the mask is 255.255.255.192, the network is 192.168.1.128 and the broadcast is 192.168.1.191, leaving 129–190 usable.
Add the CIDR Subnet Calculatorwidget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/cidr-subnet-calculator"
title="CIDR Subnet Calculator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/cidr-subnet-calculator?utm_source=embed&utm_medium=widget">AltFTool — free online tools</a></p>