Home Blog IP Calculator: How to Work Out a Subnet from CIDR

IP Calculator: How to Work Out a Subnet from CIDR

08/08/2026

A notation like 192.168.1.10/24 shows up in router settings, firewall rules, and network documentation — but it isn't always obvious what it actually means: which range of addresses belongs to the subnet, how many hosts fit in it, and what its broadcast address is. Let's walk through how this is calculated.

What CIDR notation is

CIDR (Classless Inter-Domain Routing) is a way to write an IP address together with its subnet mask as a single number: /24 means the first 24 bits of the address are the network number, and the remaining 8 bits are the host number within it. The larger the number after the slash, the fewer addresses the subnet has:

Prefix Mask Total addresses Usable hosts
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/28 255.255.255.240 16 14
/30 255.255.255.252 4 2

What the calculator shows

From an address and prefix, the IP calculator computes:

  • Network address — the first address in the subnet, identifying the network itself.
  • Broadcast address — the last address in the subnet, reserved for broadcasting to every host on the network.
  • Subnet mask and wildcard mask — the latter is used in some devices' ACLs (Cisco, for example).
  • First and last usable host — the range of addresses that can be assigned to devices.
  • Total and usable address counts, the network class (A/B/C), and whether the address is private.

Working through a /24 example

For 192.168.1.10/24: the network address is 192.168.1.0, the broadcast address is 192.168.1.255, and the usable host range runs from 192.168.1.1 to 192.168.1.254 (254 addresses). The first and last addresses of the subnet are reserved for the network and broadcast, so they can't be assigned to a device.

The special cases: /31 and /32

  • /32 — a mask for a single specific host (256 addresses in the subnet in theory, but effectively just one). Used when you need to reference an exact address rather than a range.
  • /31 — a subnet of just two addresses; per RFC 3021, it's used exclusively for point-to-point links (for example, between two routers): both addresses are used as hosts, and there's no separate "network + broadcast" pair here.

Private and public addresses

Some IPv4 ranges are reserved for local networks and aren't routed on the public internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are the best-known examples (plus 127.0.0.0/8 for loopback). The calculator flags whether the address you entered falls into one of these ranges — handy for immediately knowing whether it's a local or a public address.

Everything is computed locally in your browser — the address is never sent anywhere.

← All articles