Subnet / CIDR Calculator

Network, broadcast, host range, address type, and a splitter for smaller subnets, with the bit math shown.

FREE CALCULATOR

Ask about this result → (a moderator-reviewed answer in our Q&A; copy the share link into your question)

Worked example

Take 10.20.30.40/22. A /22 mask is 255.255.252.0, so the third octet moves in blocks of 4. 30 falls in the 28-31 block:

  • Network: 10.20.28.0
  • Broadcast: 10.20.31.255
  • Usable hosts: 10.20.28.1 to 10.20.31.254 (1,022)
  • Wildcard: 0.0.3.255
  • Type: private (RFC 1918)

Splitting that /22 into /24s gives 4 subnets: 10.20.28.0, .29.0, .30.0 and .31.0, each with 254 usable hosts. Cloud platforms often reserve extra addresses in every subnet, so check your provider's documentation before sizing a VPC.

Sources

Formulas checked against the sources above and our worked-example tests on 2026-10-16. Code sections are cited by number only; read the text in your adopted edition. Planning aid, not engineering, legal or code advice.