IPv4 Subnet Calculator
IPv4 subnet calculator. Accepts CIDR (/24) or dotted-decimal (255.255.255.0) input. Calculates network address, broadcast, first/last usable host, total + usable host count, mask in 3 formats (dotted/hex/binary), wildcard mask, IP class, and RFC 1918 private vs public classification.
IPv4 Subnet Calculator
192.168.1.0/24, 10.0.0.0 255.0.0.0, or just an IP (defaults to /32)
How to use the subnet calculator
Enter an IP + mask
Either CIDR notation (/24) or dotted-decimal mask (255.255.255.0). Both forms produce identical results.
Read the network info
The tool computes: network address, broadcast, first/last usable host, total + usable host count, mask in 3 formats (dotted/hex/binary), wildcard mask, IP class, and public/private classification.
Check privacy + class
The "Network privacy" field flags RFC 1918 private ranges (10/8, 172.16/12, 192.168/16), loopback (127/8), link-local (169.254/16), and public IPs.
Wildcard mask for ACLs
Cisco ACLs and some firewall rules use wildcard masks (inverse of subnet masks). The tool calculates it automatically — handy for copy-paste into router configs.
IPv4 subnetting — the foundational network skill
IPv4 subnetting is the bedrock skill of network administration. Every CCNA, every cloud architect, every junior sysadmin learns it; it appears on every networking certification exam. The math is simple but error-prone: a single bit miscount can route a packet to the wrong network and break production. A subnet calculator is to the network engineer what a calculator is to the accountant — used dozens of times a day to avoid stupid mistakes.
CIDR vs classful
The original IPv4 design used classful addressing: Class A = /8, Class B = /16, Class C = /24. This wastes addresses (a small office given a Class C gets 254 hosts whether they need 5 or 250). CIDR (Classless Inter-Domain Routing) introduced in 1993 lets you specify any prefix length (e.g. /27 = 30 usable hosts), enabling efficient allocation. Modern networking is 100% CIDR; the classful labels remain only as historical reference.
"Every junior engineer assumes /24 = 256 hosts. The right answer is 254 — the network address and broadcast address are reserved. /30 = 4 addresses but only 2 usable. /31 is a special case: 2 addresses, 2 usable (RFC 3021 for point-to-point links)."
Why wildcard masks confuse
Subnet masks have 1-bits for the network portion and 0-bits for hosts. Wildcard masks are the inverse — 0-bits for what must match, 1-bits for "any". Cisco ACLs and OSPF area definitions use wildcard masks. The mental flip trips up everyone the first few times.
Private vs public
RFC 1918 reserves three private IPv4 ranges that are not routable on the public internet: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. These are universally used inside organisations, then NATed at the perimeter. This tool flags these ranges + loopback (127/8) + link-local (169.254/16) automatically.
10 facts about IPv4 subnetting
IPv4 has 4.29 billion addresses total (2³²) — fully exhausted by IANA in 2011 and by every RIR by 2019.
A /24 subnet contains 256 addresses but only 254 usable hosts — first is network, last is broadcast.
A /31 subnet uniquely has 2 addresses, 2 usable hosts — per RFC 3021, used for point-to-point links.
A /32 subnet = single host. Used for loopback interfaces and host routes.
The largest RFC 1918 private range is 10.0.0.0/8 — 16.7 million private addresses for one organisation.
CIDR (Classless Inter-Domain Routing) was introduced in 1993 (RFC 1519) to slow IPv4 exhaustion.
Wildcard masks in Cisco IOS are the bitwise inverse of subnet masks — 0.0.0.255 = /24.
The broadcast address (all-ones host bits) means "send to every host in this subnet" — used by DHCP, ARP, and some legacy services.
VLSM (Variable Length Subnet Masking) allows different prefix lengths within the same parent network — efficient for nested allocation.
IPv6 makes most subnetting redundant — every typical IPv6 subnet is a /64 with 18 quintillion addresses. No more "running out".
Frequently asked questions
No. /24 has 256 total addresses but only 254 usable hosts — the first (network address) and last (broadcast) are reserved.
They're identical — two notations for the same subnet mask. /24 = CIDR notation (24 leading 1-bits); 255.255.255.0 = dotted decimal.
RFC 3021 (2000) allows /31 subnets for point-to-point links — 2 addresses, both usable, no network/broadcast reservation. Before RFC 3021, /31 was unusable.
The bitwise inverse of a subnet mask. /24 subnet mask = 255.255.255.0; wildcard = 0.0.0.255. Used by Cisco ACLs and OSPF area definitions.
RFC 1918: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Plus 127.0.0.0/8 (loopback) and 169.254.0.0/16 (link-local). This tool flags all of these automatically.
Variable Length Subnet Masking — using different prefix lengths within the same parent network. E.g. split 192.168.0.0/16 into mixed /24 and /27 child subnets for efficient allocation.
Yes, despite IPv6 adoption growing. Enterprise internal networks, ISP backbones, and most public-facing services still use IPv4. Subnetting remains a daily skill.
Classful addressing gave entire /16 or /8 blocks to organisations regardless of need. CIDR allows /20, /22, etc. — granting just enough addresses, not wasteful blocks. Stretched IPv4 lifetime by 20+ years.
It does, but the math is mostly trivial. Every standard IPv6 subnet is /64, which has 18 quintillion addresses — far more than will ever be used. The /64 boundary is sacred (required for SLAAC autoconfiguration).
Yes. All calculations are pure JavaScript bitwise arithmetic — no network calls. Works fully offline after page load.
Related News
You may be interested in these recent stories from our newsroom.
No related news yet for this tool. Our editorial team publishes new pieces every week.
Browse all news →75 more free tools
Calculators, converters, security tools — no signup.