CCNA Plan

Subnet calculator (IPv4, CIDR, wildcard)

Short answer

A subnet calculator takes an IPv4 address and a prefix length (or dotted mask) and returns the network address (address AND mask), broadcast address (network OR inverted mask), the usable host range (network+1 to broadcast−1), the number of hosts (2^(32−prefix) − 2, except /31 = 2 and /32 = 1), and the wildcard mask (inverted mask, used in Cisco ACLs and OSPF network statements).

Network192.168.1.128/26
Broadcast192.168.1.191
Usable hosts192.168.1.129 – 192.168.1.190 (62)
Subnet mask255.255.255.192
Wildcard mask0.0.0.63
Total addresses64
Class / typeC · Private (RFC 1918)
Mask (binary)11111111.11111111.11111111.11000000
Network (binary)11000000.10101000.00000001.10000000

How this works

The calculator does the same binary arithmetic you must do by hand on the exam: it converts the address and mask to 32-bit integers, ANDs them for the network, ORs the network with the inverted mask for the broadcast, and counts hosts as 2^(32−prefix) minus network and broadcast. /31 point-to-point links follow RFC 3021 (2 usable), /32 is a single host. Class and private-range checks follow RFC 1918. Nothing is fetched from a server; the code runs in your browser and is covered by unit tests for /26, /31, /32 and /0.

Worked examples

192.168.1.130/26 → mask 255.255.255.192, block size 64 in the 4th octet, network 192.168.1.128, broadcast 192.168.1.191, hosts .129–.190 (62), wildcard 0.0.0.63.

10.20.37.9/21 → mask 255.255.248.0, block size 8 in the 3rd octet, network 10.20.32.0, broadcast 10.20.39.255, 2,046 hosts, wildcard 0.0.7.255.

Exam shortcut: find the interesting octet (the one where the mask is not 0 or 255), compute block size = 256 − mask octet, and count up in blocks until you pass the address; the previous multiple is the network.

Study the topic

Where do you actually stand on the CCNA?

20 original questions, weighted like the real blueprint. No signup. Results in minutes.

Take the free diagnostic

Primary references

  1. RFC 4632 — Classless Inter-domain Routing (CIDR) — IETF · government · retrieved 2026-09-21, verified 2026-09-21
  2. RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links — IETF · government · retrieved 2026-09-21, verified 2026-09-21
  3. RFC 1918 — Address Allocation for Private Internets — IETF · government · retrieved 2026-09-21, verified 2026-09-21
  4. CCNA Exam v1.1 (200-301) Exam Topics — Cisco Systems · primary · retrieved 2026-09-21, verified 2026-09-21