IPv4 Subnet Calculator

Type an address in CIDR notation — like 192.168.1.130/26 — and read off everything an exam question or a real config needs: network, broadcast, host range, subnet mask, and the ACL wildcard.

Network192.168.1.128/26
Subnet mask255.255.255.192
Wildcard mask0.0.0.63
Broadcast192.168.1.191
Host range192.168.1.129 – 192.168.1.190
Usable hosts62
Total addresses64
Address typePrivate (RFC 1918)
ClassC
Mask (binary)11111111.11111111.11111111.11000000
Don't just calculate it — prove it

Drop two PCs and a router onto the NetForge-AI canvas, assign the addresses you computed here, and watch the ping succeed — or watch exactly where it dies when the mask is wrong. That's how subnetting actually sticks.

Try it in the free subnetting lesson

How the calculation works

An IPv4 address is 32 bits. The prefix length (the /26 part) says how many of those bits name the network; the rest name hosts inside it. The subnet mask is just those network bits written as ones: /26 → 26 ones → 255.255.255.192.

AND the address with the mask and the host bits drop to zero — that's the network address. Set the host bits to one instead and you get the broadcast. With 6 host bits, 26 = 64 addresses exist per subnet; subtracting the network and broadcast leaves 62 usable hosts.

The shortcut version: 256 − 192 = 64, so /26 networks start every 64 addresses (.0, .64, .128, .192). 130 falls in the 128 block → network .128, broadcast .191, hosts .129–.190. That's the whole trick, and it's drilled step-by-step in Module 2 · IP Addressing & Subnetting of the course.

Subnetting FAQ

How do I calculate a subnet from an IP address and prefix?

AND the address with the subnet mask to get the network address, then OR it with the inverted mask to get the broadcast. Everything between them is the host range. For 192.168.1.130/26 the mask is 255.255.255.192, the network is 192.168.1.128, the broadcast is 192.168.1.191, and hosts run 192.168.1.129–190 (62 usable).

Why does a subnet lose 2 addresses?

The all-zeros host address names the network itself and the all-ones host address is the broadcast, so a /24's 256 addresses yield 254 assignable hosts (2^n − 2). The exceptions are /31 point-to-point links (RFC 3021, both addresses usable) and /32 host routes.

What is a wildcard mask?

The bitwise inverse of the subnet mask, used by ACLs and OSPF network statements to say which bits must match. Mask 255.255.255.192 inverts to wildcard 0.0.0.63 — 0-bits must match, 1-bits are don't-care.

What's the fastest way to subnet in an exam?

Memorize the block sizes: the 'interesting' mask octet gives a block size of 256 minus its value. Mask .192 → block 64, so networks start at 0, 64, 128, 192. Find the multiple your address falls in — that's the network; the next multiple minus 1 is the broadcast.

More free tools: VLSM Planner · Wildcard Mask Converter

IPv4 Subnet Calculator — network, broadcast, hosts, wildcard mask · NetForge-AI