When you design server or cloud networks, questions like “how many hosts fit in this /24?” or “which address is the broadcast?” come up constantly. The IP/CIDR Subnet Calculator takes CIDR notation such as 192.168.1.10/24 and instantly breaks the network down — entirely in your browser.

IP/CIDR Subnet Calculator: network, broadcast and mask at a glance

CIDR and subnet basics

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and prefix length as address/prefix. The prefix length says how many leading bits form the network portion; the remaining bits are the host portion.

For example, /24 means the first 24 bits are the network and the remaining 8 bits are hosts. With 8 host bits, the subnet contains 2^8 = 256 addresses. The first one (the network address) and the last one (the broadcast address) cannot be assigned to hosts, so the number of usable hosts is 256 − 2 = 254.

Prefix length cheat sheet

The prefixes you will reach for most often:

Prefix Subnet mask Total addresses Usable hosts
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/29 255.255.255.248 8 6
/30 255.255.255.252 4 2

Worked example: 192.168.1.10/26

/26 leaves 6 host bits (2^6 = 64 addresses). Splitting 192.168.1.0/24 into 64-address blocks, 192.168.1.10 falls into the first block:

  • Network address: 192.168.1.0
  • Broadcast address: 192.168.1.63
  • Usable host range: 192.168.1.1 – 192.168.1.62
  • Subnet mask: 255.255.255.192
  • Wildcard mask: 0.0.0.63

The wildcard mask is the bit-inverse of the subnet mask, used to specify ranges in ACLs (access control lists) on Cisco-style equipment.

The /31 and /32 special cases

Normally two addresses (network and broadcast) are excluded, but two prefixes are exceptions:

  • /32: a single host. Used when targeting exactly one address, e.g. host routes or ACL entries.
  • /31: defined by RFC 3021 for point-to-point links. No network/broadcast addresses are reserved, so both addresses are usable — a common address-saving choice for router-to-router links.

The IP/CIDR Subnet Calculator handles both special cases correctly when computing host counts.

How input is handled, with real output

Here is how the tool treats input, based on actual calculations.

Input Result Point
192.168.1.130/24 Network 192.168.1.0/24, hosts 192.168.1.1–192.168.1.254 (254) Even if you enter a host address, it is normalized to the network address
172.16.5.9/20 172.16.0.0/20, mask 255.255.240.0, wildcard 0.0.15.255, 4,094 usable Prefixes that don’t fall on an 8-bit boundary work too
192.168.1.0/30 4 total, 2 usable (.1–.2) A small subnet used for things like a link between two routers
192.168.1.1 (no /) 192.168.1.1/32, 1 usable Omitting the / is treated as /32
0.0.0.0/0 4,294,967,296 total, not private Every IPv4 address
172.32.0.1/16 Not private Outside 172.16.0.0–172.31.255.255, so it counts as a public address
169.254.1.1/16 Shown as private Link-local is also counted as “private” (and so is the 127.0.0.0/8 loopback)

The private check covers the three RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), plus loopback and link-local.

Some notations aren’t accepted.

  • Subnet-mask form: a mask such as 192.168.1.0/255.255.255.0 is not accepted. Enter a prefix length such as /24.
  • Shortened octets: an address without all four octets, such as 1.2.3/24, is an error.
  • Out-of-range values: 256.1.1.1/24 gives “octet must be 0–255”, and 10.0.0.1/33 gives “prefix length must be 0–32”.
  • Leading zeros: 010.0.0.1 is read as 10.0.0.1. Some operating systems treat a leading 0 as octal, so watch for differences between environments.

What the tool calculates

  • Network and broadcast addresses
  • Usable host range (first–last), total and usable counts
  • Subnet mask (dotted decimal) and wildcard mask
  • RFC 1918 private / loopback / link-local detection
  • One-click copy for every value

Everything you type is processed inside your browser and never sent to a server, so it is safe to use with internal network and production addressing plans.

New in November 2026

  • IPv6 prefix calculator: from an expression like 2001:db8::1/64 it gives the short and full forms, the network and last address, the address count (128-bit), the type (link-local, unique local and so on) and the ip6.arpa reverse name.
  • It can also split a prefix (up to 256 subnets) and check whether an address is inside it. :: shortening, a trailing IPv4 part and zone IDs are accepted.

Try it in the tool

FAQ

Why is the usable host count 2 less than the total?

In a normal subnet, the first address (network) and the last address (broadcast) cannot be assigned to hosts. A /24 therefore has 256 total addresses but 254 usable hosts. The exceptions are /31 and /32, as described above.

Does it support IPv6?

Yes. The tool’s “IPv6 prefix calculator” takes expressions such as 2001:db8::/32 and gives the short and full forms, the network and last address, the address count, the type, the ip6.arpa name, splitting and an inside-the-range check. The main calculator, aggregation and range-to-CIDR are IPv4 only.

Are the IP addresses I enter sent anywhere?

No. All calculations run in JavaScript inside your browser; nothing you enter is transmitted to a server.