SOLVETUTORMATH SOLVER

Instrument MI-14-112 · Other

IP Subnet Calculator

Enter an address and a /prefix and this instrument works out the whole subnet around it — mask, network, broadcast, and usable hosts.

Instrument MI-14-112
Sheet 1 OF 1
Rev A
Verified
Type 14 — Networking SER. 2026-14112

Network address

192.168.1.0

block size = 2^(32-prefix); network = floor(ip/blockSize)*blockSize; broadcast = network+blockSize-1

255.255.255.0 Subnet mask
192.168.1.255 Broadcast address
192.168.1.1 First usable host
192.168.1.254 Last usable host
254 Usable hosts
256 Total addresses
The working Every figure verified twice
  1. 192.168.1.10/24 -> network 192.168.1.0, broadcast 192.168.1.255, 254 usable hosts
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

CIDR (Classless Inter-Domain Routing) notation writes a subnet as an address plus a slash and a number, like 192.168.1.10/24 — that number is the prefix length, the count of leading bits reserved for identifying the network itself. The remaining 32-minus-prefix bits are host bits, free to vary across every address in that subnet. A /24 reserves 24 network bits and leaves 8 host bits, giving 2^8 = 256 total addresses in that block; a /30 leaves only 2 host bits, for just 4 addresses.

From the prefix length alone, several other values follow directly. The subnet mask is the dotted-decimal form of the prefix — N leading 1-bits followed by 0s. The network address is the lowest address in the block (with all host bits set to 0), identifying the subnet itself rather than any specific device on it. The broadcast address is the highest address in the block (all host bits set to 1), traditionally reserved for sending a message to every host on that subnet at once. Everything strictly between those two is a usable host address — so a /24's 256 total addresses yield 254 usable ones once the network and broadcast addresses are set aside.

Two prefix lengths break that usual pattern by design. A /31 has no room to spare — RFC 3021 defines both of its two addresses as usable host addresses on point-to-point links, with no separate network or broadcast address reserved, since reserving 2 out of only 2 addresses for a link between exactly two routers wastes half of it for nothing. A /32 is a single specific host, a route to exactly one address.

This is the everyday arithmetic behind configuring a router, sizing a cloud VPC subnet, or setting up a firewall rule: given an address and a prefix, where does the subnet start, where does it end, and how many devices can actually live inside it.

total addresses = 2^(32 - prefix)
network address = floor(address / total addresses) x total addresses
broadcast address = network address + total addresses - 1
usable hosts = total addresses - 2 (except /31: 2 usable, /32: 1 usable)
prefix — the CIDR /N value, the count of network bits · total addresses — every address in the block, network and broadcast included · usable hosts — addresses actually assignable to a device, excluding the reserved network and broadcast addresses on prefixes /30 and shorter.
  • Enter Octet 1 through Octet 4 for the IPv4 address.
  • Enter CIDR prefix (/N) — the number of network bits, from 0 to 32.
  • Read Subnet mask, Network address, and Broadcast address for the subnet's boundaries.
  • Read First usable host and Last usable host for the assignable address range.
  • Read Usable hosts and Total addresses to see how many devices the subnet can hold.

Worked example — 192.168.1.10/24, a classic home network

192.168.1.10/24 is about as common as home-network subnets get — a /24 leaves 8 host bits, so total addresses = 2^8 = 256. Subnet mask reads 255.255.255.0. Network address (the lowest address, all host bits zero) reads 192.168.1.0, and Broadcast address (all host bits set) reads 192.168.1.255.

First usable host reads 192.168.1.1 and Last usable host reads 192.168.1.254, giving Usable hosts = 256 - 2 = 254 — plenty of room for the phones, laptops, and smart-home devices on a typical home router, which itself usually takes the first usable address, 192.168.1.1, as its own LAN gateway address.

Questions

What does the /24 in an IP address mean?

It's the CIDR prefix length — the number of leading bits, out of the address's 32 total, reserved to identify the network rather than an individual host. A /24 means 24 network bits and 8 host bits, giving 2^8 = 256 total addresses in that subnet. Smaller prefix numbers mean fewer network bits and more host bits, so a smaller number like /16 describes a much larger subnet than a bigger number like /28.

How do you calculate the number of usable hosts in a subnet?

Take the total address count, 2^(32-prefix), and subtract 2 for the reserved network and broadcast addresses — a /24 gives 2^8 - 2 = 254 usable hosts, a /28 gives 2^4 - 2 = 14. The two exceptions are /31, defined by RFC 3021 to have both of its 2 addresses usable with no reserved network or broadcast address at all, and /32, which is a single host address by itself, with exactly 1 usable address.

Why aren't the network and broadcast addresses usable for hosts?

The network address (all host bits zero) identifies the subnet itself as a block, not any individual device on it, and the broadcast address (all host bits one) is the special destination that traditionally delivers a message to every host on the subnet simultaneously. Assigning either one to a specific device would create ambiguity — a packet addressed to the network or broadcast address needs to mean the whole subnet, not one particular host within it.

What's special about a /31 or /32 subnet?

A /31 has only 2 total addresses, and RFC 3021 defines both as usable host addresses on point-to-point links (like a connection between two routers), with no network or broadcast address reserved — dedicating half a 2-address block to bookkeeping made no practical sense. A /32 identifies exactly one address as a route to a single host, commonly used for loopback interfaces or very specific host-level routing entries.

How is the subnet mask related to the CIDR prefix?

They express the same information in two different formats. The CIDR prefix is just the count of leading 1-bits — /24 means 24 ones. The subnet mask writes that same pattern out in full, as a 32-bit dotted-decimal number: 24 leading 1-bits followed by 8 zero-bits renders as 255.255.255.0. Any CIDR prefix converts to exactly one subnet mask and vice versa; they're interchangeable notations for the identical network boundary.

References