AZ Tools

Subnet Calculator (IPv4 / CIDR)

Network

Give it an IPv4 address with CIDR (like 192.168.1.0/24) and it returns the network address, broadcast, netmask, wildcard mask, first/last usable host, host count, and IP class. Also detects RFC 1918 private ranges (10/8, 172.16/12, 192.168/16), loopback (127/8), and link-local (169.254/16). Includes a binary view so you can see how the mask aligns. Handles /31 (point-to-point) and /32 (single host) edge cases correctly.

Network

192.168.1.0/24

Netmask

255.255.255.0

Broadcast

192.168.1.255

Wildcard

0.0.0.255

First host

192.168.1.1

Last host

192.168.1.254

Usable hosts

254

CIDR

/24 (24 net bits, 8 host bits)

Class

C

Range

Private / reserved

Binary

IP11000000.10101000.00000001.00000000
Mask11111111.11111111.11111111.00000000
Net11000000.10101000.00000001.00000000

All math is 32-bit unsigned. Default CIDR is /32 if you only enter an address. RFC 1918 ranges and loopback are flagged.

How to use

  1. Enter an IPv4 address with optional CIDR (e.g. 10.0.5.42/16, or 8.8.8.8 for /32).
  2. Read the network address, broadcast, and usable host range.
  3. Check whether the IP is in a private range before exposing it externally.

Frequently asked questions

Why are first/last host different from network/broadcast?
In a regular /N subnet, the lowest address is the network ID and the highest is the broadcast — both are reserved. Usable hosts run from network+1 to broadcast−1. /31 and /32 are exceptions (RFC 3021).
What's the wildcard mask for?
It's the bitwise NOT of the netmask, used by Cisco ACLs. 255.255.255.0 ↔ 0.0.0.255. ACL rules like 'permit 192.168.1.0 0.0.0.255' match the same range as a /24 subnet.
Does it work for IPv6?
No, IPv4 only. IPv6 has very different semantics — 128-bit addresses, no broadcast (uses multicast), no traditional 'classes', and prefixes commonly /48, /56, /64. A separate tool is needed.
Why does 10.0.0.0/8 show ~16M hosts?
2^(32−8) − 2 = 16 777 214 usable hosts. The /8 means 8 network bits + 24 host bits. Real networks subdivide this — nobody routes a flat /8 in practice.

Related tools