yigityalim
projectshandbookslabshireshare
xgithub
siteprojectshandbookslabschangelog
aboutusesnowhireshare
elsewherexgithublinkedinemail
metarssllms.txtsitemap
© 2026 Yiğit Yalım. All rights reserved.
/
Back to Labs
May 10, 2026·web

CIDR Subnet Calculator

From an IPv4 CIDR input, computes network address, broadcast, first/last usable host, host count, subnet mask, and a binary breakdown. Classifies the address (RFC 1918, loopback, link-local).

networking · cidr · subnet · ipv4

PreviousChaCha20 Inner State StepperNextColor Contrast (WCAG)

Designing VPC subnets, writing firewall rules, debugging kubectl networking — you keep doing the same arithmetic. This lab pulls every value out of a single input.

CidrCalculator — IPv4 subnet breakdown
RFC 1918 · private10.0.0.0/8
binary · 22 network · 10 host
00001010
.00000000
.00101010
.00010001
network bitshost bits
network
10.0.40.0/22
broadcast
10.0.43.255
first host
10.0.40.1
last host
10.0.43.254
subnet mask
255.255.252.0
wildcard
0.0.3.255
total addresses
1,024
usable hosts
1,022

CIDR in 30 seconds

192.168.1.0/24 = "a 256-address block starting at 192.168.1.0, with the first 24 bits as the network portion".

PrefixHost bitsTotal addressesUsable hosts
/248256254
/239512510
/161665,53665,534
/2841614
/30242 (point-to-point)
/31122 (RFC 3021)
/32011 (host route)

"Usable" subtracts the network address (first) and broadcast (last). /31 and /32 are exceptions — point-to-point links use both addresses.

Address classes (legacy)

Pre-CIDR "classful" architecture is dead in routers but worth knowing:

  • Class A 0.0.0.0 – 127.255.255.255 (/8 default mask)
  • Class B 128.0.0.0 – 191.255.255.255 (/16)
  • Class C 192.0.0.0 – 223.255.255.255 (/24)
  • Class D multicast (224.0.0.0 – 239.255.255.255)
  • Class E reserved
  • 127.0.0.0/8 loopback
  • RFC 1918 private: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16