🛠️ Custom Calculators · Utilities · Websites · ERP · CRM Hire Us

IP Subnet Calculator — CIDR, Netmask & Host Ranges

Enter any IPv4 address with a CIDR prefix to get the network address, broadcast, usable host range, masks and binary breakdown — calculated instantly and privately in your browser. 🌐

🌐

IP Subnet Calculator

IPv4 / CIDR

🔒 All subnet math runs in your browser — the address you type is never sent anywhere.

🌐
Enter an IP and prefix, then hit Calculate

How to Use the Subnet Calculator

  1. Enter an IPv4 address — e.g. 192.168.1.10 — or paste full CIDR like 10.0.0.5/16 straight into the box.
  2. Pick the prefix from the dropdown (each option shows its dotted mask, e.g. /24 — 255.255.255.0).
  3. Click Calculate to see network, broadcast, usable range, masks, class and the binary breakdown.
⚡

Instant & exact

Pure integer math, no rounding — every value from /0 to /32 including the /31 and /32 special cases.

🎓

Learn while you calc

Binary view of the IP and mask makes CIDR finally click — perfect for CCNA, Network+ and homework.

🔒

Private

Your internal network addresses never leave your browser — nothing is logged or transmitted.

CIDR and Subnetting, Explained

CIDR (Classless Inter-Domain Routing) notation describes a network as an IP address plus a prefix length — 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits identify hosts. The prefix maps directly to a subnet mask: /24 is 255.255.255.0, /16 is 255.255.0.0, /26 is 255.255.255.192. The wildcard mask is simply the inverse (0.0.0.255 for /24) and is what Cisco ACLs and OSPF configuration expect.

Every subnet reserves two addresses: the all-zeros network address and the all-ones broadcast address. That is why a /24 offers 2^8 − 2 = 254 usable hosts and a /30 only 2. Two modern exceptions matter in 2026 networks: a /31 (RFC 3021) provides 2 usable addresses for point-to-point router links with no broadcast, and a /32 identifies a single host — the standard form for firewall rules, loopbacks and route advertisements.

The calculator also identifies the historical class (A: 1–126, B: 128–191, C: 192–223, D multicast, E experimental) and whether the address is private or public. The RFC 1918 private ranges — 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 — are what your home router, office LAN and cloud VPCs use internally; they are never routed on the public internet. It also flags loopback (127/8), link-local/APIPA (169.254/16) and carrier-grade NAT (100.64/10) space, so you can tell at a glance why a device got a weird address.

Whether you are carving an AWS or Azure VPC into subnets, sizing a VLAN, studying for the CCNA, or just figuring out which addresses are free on your home network, all of the math here is exact 32-bit integer arithmetic done locally in your browser.

Formula & Logic

Subnetting divides an IP address into a network portion and a host portion, with CIDR notation stating how many leading bits belong to the network. A /24 reserves 24 bits for the network and leaves 8 for hosts. Two addresses in every subnet are unusable: the all-zeros address identifies the network itself and the all-ones address is the broadcast, which is why a /24 offers 254 usable hosts rather than 256. Each additional network bit halves the host count, so subnet sizes move in powers of two and there is no way to create a subnet of, say, exactly 100 addresses.

Total addresses = 2^(32 − prefix)Usable hosts = 2^(32 − prefix) − 2Subnet mask = prefix ones followed by (32 − prefix) zerosSubnets created = 2^(new prefix − old prefix)

where:

prefix
the /n value — number of network bits
block size
total addresses per subnet; also the increment between subnet boundaries
reserved
network address and broadcast address, always two per subnet

Assumptions: IPv4 with the standard two reserved addresses. Point-to-point /31 links are a defined exception under RFC 3021. IPv6 does not reserve a broadcast address and uses vastly larger prefixes.

SourceRFC 3021

Step-by-Step Example: Splitting 192.168.1.0/24 Into /26 Subnets

Divide a standard home-sized network into four equal subnets.

  • Original network192.168.1.0/24
  • New prefix/26
  1. Host bits in a /26: 32 − 26 = 6.
  2. Block size: 2⁶ = 64 addresses per subnet.
  3. Usable hosts: 64 − 2 = 62 per subnet.
  4. Number of subnets: 2^(26 − 24) = 4.
  5. Subnet mask: 26 ones then 6 zeros = 255.255.255.192.
  6. Boundaries increment by 64: .0, .64, .128 and .192.

ResultFour /26 subnets of 62 usable hosts each — mask 255.255.255.192

The first subnet runs .1 to .62 with .63 as its broadcast; the second starts at .65. Needing 100 hosts would force a /25 (126 hosts) because subnet sizes only come in powers of two — there is no intermediate option.

IP Subnet Calculator FAQ

CIDR (Classless Inter-Domain Routing) writes a network as an IP plus a prefix length, like 192.168.1.0/24. The prefix says how many leading bits identify the network; the remaining bits identify hosts within it.
254. A /24 has 256 addresses, but the first (network address) and last (broadcast address) are reserved, leaving 2^8 minus 2 usable host addresses.
They are bitwise inverses. A /24 subnet mask is 255.255.255.0 while its wildcard mask is 0.0.0.255. Wildcard masks are used in Cisco access lists and OSPF network statements.
The RFC 1918 ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They are used inside homes, offices and cloud VPCs and are never routed on the public internet.
RFC 3021 allows /31 subnets on point-to-point router links, where both addresses are usable and no broadcast address is needed. A /32 identifies a single host, commonly used in firewall rules and loopbacks.
No. All subnet math is pure 32-bit integer arithmetic done locally in your browser, so internal network addresses stay completely private.
The historical classful system: Class A (1–126), B (128–191) and C (192–223) for unicast, D (224–239) for multicast and E (240–255) reserved. Modern networks use CIDR instead, but classes still appear on certification exams.

More Utilities

Need something built?

The team behind these free tools builds custom calculators, utility tools, website design, ERP and CRM systems and custom software — plus content writing and research.

Start a conversation →
✔ Written & reviewed by Dr Sam — 20+ yrs in management & research leadership📅 Last updated June 2026📑 How we build & check these