Skip to content
AdminKit

Subnet and CIDR basics: how do you read a subnet calculator result?

AdminKit explains how to read a subnet calculator result: given an address and a CIDR prefix like /24, it returns the network address, the broadcast address (IPv4 only), the usable host range between them, and the total host count — because the prefix length is what splits any IP address into a fixed network portion and a variable host portion.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • The number after the slash is the prefix length: how many leading bits are fixed as the network. Everything after it is the host part, so a /24 holds 2^8 = 256 addresses and a /26 holds 2^6 = 64.
  • The calculator finds the network address by ANDing your address with the mask. That is why 192.168.1.77/26 comes back as the subnet 192.168.1.64/26.
  • In an ordinary IPv4 subnet the first address (network) and last address (broadcast) are not assigned to devices, so usable hosts = total − 2. /31 and /32 are the exceptions.
  • IPv6 has no broadcast address, and subnets that devices join are normally a /64, because SLAAC needs a 64-bit interface identifier.
  • A subnet calculator does arithmetic on paper. It cannot tell you which addresses are actually in use.

What does the slash number in CIDR notation mean?

The number after the slash says how many of the address’s leading bits are fixed as the network portion. Every bit after it is the host portion and can vary from device to device.

Before CIDR (Classless Inter-domain Routing), IPv4 addresses were divided into rigid classes (A, B, C) with fixed-size networks, which wasted huge amounts of address space on organizations that needed something in between. Today, regional registries such as RIPE NCC allocate address space to their members using exactly this CIDR notation, rather than the old fixed-size classes. CIDR replaced the classes with a single, flexible idea: write the prefix length directly after the address, as in 192.168.1.0/24. A /24 fixes 24 bits and leaves 8 free, giving 2^8 = 256 total addresses; a /28 fixes 28 bits and leaves only 4 free, giving 2^4 = 16 addresses. AdminKit’s subnet calculator does this arithmetic for you, entirely in your browser, for both IPv4 and IPv6.

The same prefix can also be written as a dotted subnet mask: 24 one-bits followed by 8 zero-bits is 255.255.255.0. The calculator accepts either form for IPv4, and shows both the mask and its inverse, the wildcard mask, in the result. Microsoft’s TCP/IP addressing and subnetting article for Windows describes the mask the same way: it divides an IP address into one part that identifies the network and one that identifies the host. RFC 950, which defined subnetting, recommended that subnet bits be contiguous. CIDR prefixes are always contiguous, so a mask such as 255.0.255.0 has no prefix length. AdminKit’s calculator rejects it as not a valid subnet mask.

PrefixSubnet maskWildcard maskTotal addressesUsable IPv4 hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/16255.255.0.00.0.255.25565,53665,534
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/26255.255.255.1920.0.0.636462
/28255.255.255.2400.0.0.151614
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Each step of one bit halves or doubles the block. The wildcard mask is just the subnet mask with every bit flipped, so it marks the host bits rather than the network bits.

How does a calculator work out the network address?

It takes your address and the mask, and keeps only the bits where the mask is 1. That bitwise AND clears every host bit, and what is left is the network address. Setting every host bit to 1 instead gives the broadcast address.

Here is the calculation for 192.168.1.77/26. Only the last octet changes, because the first three octets of a /26 mask are all ones:

Address      192.168.1.77    last octet  01001101
Mask /26     255.255.255.192 last octet  11000000
AND          -> network                  01000000  = 64   -> 192.168.1.64
Host bits    set to 1        -> broadcast 01111111 = 127  -> 192.168.1.127
Usable range 192.168.1.65 to 192.168.1.126  (64 total - 2 = 62 hosts)

This is why the calculator can be given any address inside a subnet, not only the network address, and still return the right block. The address you typed is shown back to you, but the result describes the subnet that contains it.

What does each field in an IPv4 result mean?

Each field is a direct consequence of the prefix: the network and broadcast addresses are the two ends of the block, and the usable range is everything between them. These are the six fields AdminKit’s calculator shows for IPv4, with the values it returns for 192.168.1.77/26:

FieldValue for 192.168.1.77/26What it means
Network address192.168.1.64Every host bit set to zero. It identifies the subnet as a whole and isn’t assigned to a device.
Broadcast address192.168.1.127Every host bit set to one, reserved for sending one message to every host on the subnet at once. Also not assigned to a device.
Subnet mask255.255.255.192 (/26)The prefix length written as a dotted mask.
Wildcard mask0.0.0.63The inverse of the mask: ones mark the host bits.
Usable host range192.168.1.65 – 192.168.1.126The pool of addresses you can actually give to devices, gateways and printers.
Usable hosts62 (of 64 total addresses)Always 2 less than the total, except for /31 and /32.

The rule that the all-zeros and all-ones host values are special is old. RFC 950 carried forward the convention that an address of zero means “this” network and all ones means “all” hosts, and RFC 1122 (section 3.2.1.3) lists the all-ones host field as a directed broadcast to that network.

What happens with a /31 or a /32?

A /31 has two addresses and both are usable; a /32 has one address and it is the host itself. Neither has a separate network or broadcast address to subtract.

RFC 3021 defines /31 specifically for point-to-point links between two routers. With only one host bit, the two possible addresses would normally be the network and broadcast addresses, but the RFC says that on a point-to-point link they must be treated as host addresses: a link with exactly two endpoints has no meaningful broadcast domain to reserve an address for. A /32 is a single host route with no subnet structure at all; RFC 4632’s prefix table lists /32 as one address, a “host route”.

AdminKit’s calculator still fills in every field for these prefixes, so read them with the rule above in mind:

InputNetworkBroadcast fieldUsable host rangeUsable hosts
10.255.0.0/3110.255.0.010.255.0.110.255.0.0 – 10.255.0.12 (of 2)
10.255.0.5/3210.255.0.510.255.0.510.255.0.5 – 10.255.0.51 (of 1)

For a /31, the value in the broadcast field is simply the second address of the pair, and both appear in the usable range. Don’t treat it as a broadcast address on the link.

How do you read an IPv6 result?

IPv6 has no broadcast address, so nothing is subtracted, and the usual subnet is a /64. AdminKit’s calculator shows five IPv6 fields: the network address with its prefix, the same network written out in full, the first address, the last address, and the total address count.

IPv6 dropped broadcast in favor of multicast for one-to-many traffic; RFC 4291 states plainly that there are no broadcast addresses in IPv6. Subnet sizes are also conventionally far larger than IPv4 ever used: a /64 is the standard size for any subnet that devices connect to directly, giving 2^64 addresses, so running out of addresses inside one subnet is not a practical concern. That size isn’t arbitrary generosity. RFC 4291 requires 64-bit interface identifiers for most unicast addresses, and Stateless Address Autoconfiguration (SLAAC, RFC 4862) relies on that 64-bit host portion so a device can generate its own address without a DHCP server.

Example result (documentation prefix) for the input 2001:db8:abcd:12::1/64:

Network address      2001:db8:abcd:12::/64
Network (expanded)   2001:0db8:abcd:0012:0000:0000:0000:0000
First address        2001:db8:abcd:12::
Last address         2001:db8:abcd:12:ffff:ffff:ffff:ffff
Total addresses      18446744073709551616

The short and expanded forms are the same address: the short form drops leading zeros in each group and collapses the longest run of zero groups to ::. “First address” here is the all-zeros interface identifier, which RFC 4291 defines as the Subnet-Router anycast address, so don’t hand it to an ordinary host. See IPv6 and home devices: why no NAT means a firewall for what that large, directly-routable address space means for securing each device individually, since there’s no NAT boundary hiding them behind a single shared address the way IPv4 commonly does.

Which misreadings cause real mistakes?

Most subnet errors come from reading a correct result the wrong way, not from bad arithmetic. These are the ones to check first:

MisreadingWhat’s actually true
“The address I typed is the network address.”The calculator applies the mask. 192.168.1.77/26 belongs to 192.168.1.64/26.
“Anything ending in .0 or .255 is unusable.”Only at the edges of the block. In 192.168.0.0/23, both 192.168.0.255 and 192.168.1.0 are ordinary usable hosts.
“The wildcard mask is another way to write the subnet mask.”It is the inverse. Pasting one where the other is expected matches the wrong bits.
“The broadcast field of a /31 is reserved.”RFC 3021 makes both /31 addresses host addresses on a point-to-point link.
“The calculator shows which addresses are free.”It only shows which addresses belong to the subnet, not which are assigned.

Why does subnetting matter beyond the math?

Subnetting is how networks are segmented for both operational and security reasons. Splitting one large address block into smaller subnets lets an organization isolate a guest Wi-Fi network from internal servers, give each office location its own routable segment, or separate IoT devices from the rest of a network so a compromise in one segment doesn’t automatically expose the others. Planning several such segments from one block is covered step by step in using a subnet calculator to plan a VLAN or multi-subnet network.

The same CIDR math also tells you whether an address falls inside a reserved range worth recognizing on sight: the private ranges defined by RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), or the 100.64.0.0/10 block ISPs use for carrier-grade NAT. Both are listed alongside every other reserved IPv4 block in IANA’s IPv4 Special-Purpose Address Registry, whose current structure comes from RFC 6890; its initial entries also include 255.255.255.255/32 (limited broadcast) and the 192.0.2.0/24 documentation range. See what is CGNAT? for why an address in that specific range behaves differently from an ordinary private IP.

Why do reverse DNS zones follow the same boundaries?

Because reverse DNS for IPv4 is delegated one octet at a time. A reverse DNS zone (in-addr.arpa) lines up cleanly with a /24 but not with a smaller subnet like a /28 carved out of one, which is the case classless reverse delegation (RFC 2317) exists to solve. If you’re assigning a PTR record to a host inside a subnet you’ve just calculated, AdminKit’s reverse DNS tool is the quickest way to confirm what that address currently resolves to before you add or change anything. This guide is part of AdminKit’s DNS cluster of DNS and addressing guides and tools.

How do you use the calculator in practice?

  1. Enter an address with a prefix (192.168.1.0/24) or a dotted mask (10.0.0.0/255.255.0.0) for IPv4, or an address with a prefix (2001:db8::/64) for IPv6, in AdminKit’s subnet calculator.
  2. Check the usable range before assigning addresses. Assigning the network or broadcast address to a device is a classic, avoidable IPv4 misconfiguration.
  3. Remember it’s arithmetic, not a live scan. It tells you which addresses belong to a subnet on paper, not which ones are actually in use; pair it with your router’s connected-device list or a reachability check for that.
  4. For IPv6, expect a /64 by default unless you have a specific reason to subdivide it further, since most consumer and enterprise equipment assumes a /64 per subnet for SLAAC to work correctly.

See our network engineers and ISPs page for how this arithmetic fits into planning several VLANs or client allocations at once.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

What does the /24 in an address like 192.168.1.0/24 mean?

The number after the slash is the prefix length — how many of the address's leading bits are fixed as the network portion, defined by CIDR (RFC 4632). /24 means the first 24 bits (the first three of four octets in IPv4) identify the network, leaving the remaining 8 bits to identify individual hosts within it, giving 256 total addresses in that /24.

Why are the network and broadcast addresses not usable by a device?

The network address (all host bits set to zero) identifies the subnet itself, and the broadcast address (all host bits set to one) is reserved for sending a message to every host on that subnet at once — neither represents a single, addressable device, so both are excluded from the usable range. The one standard exception is a /31 subnet (RFC 3021), defined specifically for point-to-point links, where both addresses in the pair are usable since there's no broadcast domain with only two hosts.

Does IPv6 have a broadcast address like IPv4?

No — IPv6 has no broadcast concept at all; it uses multicast instead for one-to-many delivery. That's one reason IPv6 subnets don't subtract a broadcast address from their usable range the way IPv4 does, and why an IPv6 /64 subnet's entire address space (2^64 addresses) is, in principle, available to hosts.

Why is a /64 the standard IPv6 subnet size, when it's vastly larger than any network needs?

A /64 is sized for Stateless Address Autoconfiguration (SLAAC, RFC 4862), which lets a device generate its own address within the subnet without a DHCP server, using an interface identifier that occupies the remaining 64 bits. That mechanism assumes a 64-bit host portion; using a smaller host portion would break SLAAC for devices on that subnet, which is why /64 is the near-universal convention for any subnet IPv6 devices actually connect to, regardless of how few devices are on it.

Can a subnet calculator tell me whether an address is actually in use on my network?

No — it's pure address-plan arithmetic: given an address and prefix, it computes which addresses mathematically belong to that subnet. It has no visibility into which of those addresses are actually assigned to a live device; confirming that requires a separate reachability check, such as a ping sweep or your router's connected-devices list, not a subnet calculation.

Why does the calculator show a different network address from the one I typed?

Because it applies the mask to whatever address you enter. If you type a host address such as 192.168.1.77/26, the calculator clears the host bits and reports the subnet that host belongs to, 192.168.1.64/26, with a usable range of 192.168.1.65 to 192.168.1.126. The address you typed is still valid; it is simply one host inside that subnet.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.