An IP addressing range is the set of all IP addresses that share the same network prefix, defined by a subnet mask or CIDR notation. You enter an IP address and a prefix length (like 192.168.1.0/24) to see the range of usable addresses, the network address, and the broadcast address. This guide explains how ranges work, how to calculate them, and how to choose the right size for your network.
Formula
The core formula for an IP range is based on the prefix length p (in bits):
- Total addresses = 2(32 − p)
- Network address = the first address in the block (all host bits zero)
- Broadcast address = the last address in the block (all host bits one)
- Usable addresses = total − 2 (for IPv4, excluding network and broadcast)
For example, a /24 prefix has 32 − 24 = 8 host bits, so 28 = 256 total addresses. The network address is the first one (e.g., 192.168.1.0), the broadcast is the last (192.168.1.255), and the usable range is 192.168.1.1 through 192.168.1.254.
Worked Example
Using the default values from the calculator: IP 192.168.1.0, prefix 24.
- Total addresses = 2(32−24) = 28 = 256
- Network address = 192.168.1.0 (the IP itself, since host bits are zero)
- Broadcast address = 192.168.1.0 + (256 − 1) = 192.168.1.255
- Usable range = 192.168.1.1 to 192.168.1.254 (254 addresses)
The calculator shows the usable range as starting at 192.168.1.1 and ending at 192.168.1.255 (the broadcast), which is the correct way to display it for most practical purposes. The total and usable counts are also displayed.
IPv4 vs. IPv6: Two Different Worlds
IPv4 addresses are 32-bit numbers, written as four decimal octets (e.g., 192.168.1.1). They allow about 4.3 billion unique addresses. IPv6 addresses are 128-bit, written as eight groups of four hexadecimal digits (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). The range concept is identical—a prefix length (like /64) defines the network portion—but the address space is so vast that the network/broadcast distinction disappears in practice. IPv6 always uses the first address for the subnet router anycast and the last for a special multicast, but there is no “usable vs. unusable” rule like IPv4.
How to Calculate a Range Manually
If you don’t have a calculator, you can do it with binary arithmetic:
- Convert the IP address to binary (each octet to 8 bits).
- Keep the first p bits as the network prefix, set all remaining bits to 0 → network address.
- Set all remaining bits to 1 → broadcast address.
- Any address between those two (excluding the first and last) is usable.
For example, 192.168.1.0/24 in binary: the first 24 bits are 11000000.10101000.00000001, and the last 8 bits are 00000000. Setting them to 1 gives 11111111 = 255, so the broadcast is 192.168.1.255.
Common Prefix Sizes and Their Ranges
- /30 – 4 total, 2 usable (typical for point-to-point links)
- /29 – 8 total, 6 usable (small home or office network)
- /28 – 16 total, 14 usable (small business)
- /24 – 256 total, 254 usable (standard home/office subnet)
- /16 – 65,536 total, 65,534 usable (large organization)
- /8 – 16,777,216 total, 16,777,214 usable (huge, rarely used)
Remember that the usable count is always total − 2 for IPv4, unless you are using a point-to-point link with /31 or /32, where the network and broadcast addresses are not used.
How to Choose the Right Range for Your Network
Choosing a range involves two decisions: the network size and the address block itself.
- Count your devices – include computers, phones, printers, IoT devices, and a buffer for growth. Add 2 for network and broadcast.
- Pick the smallest prefix that fits – e.g., 10 devices → /28 (14 usable) is enough, but /24 is safer for growth.
- Use private ranges for internal networks – 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 are reserved for private use and not routable on the internet.
- Avoid overlapping ranges – if you have multiple subnets or VPNs, ensure ranges do not overlap, or routing will break.
Common Mistakes and Misconceptions
One frequent error is confusing the network address with the subnet mask. The network address is the first IP in the block; the subnet mask is a separate value (like 255.255.255.0) that defines the prefix. Another mistake is forgetting to exclude the network and broadcast addresses when counting usable IPs. For example, a /24 has 256 total, but only 254 can be assigned to hosts. A third misconception is that a /31 or /32 is always unusable—they are actually valid for point-to-point links (RFC 3021) and loopback interfaces, respectively.
CIDR vs. Classful Addressing
Before 1993, IP addresses were divided into fixed classes: Class A (/8), Class B (/16), and Class C (/24). This was wasteful—a company with 300 computers had to take a Class B (65,534 usable) because no Class C existed for that size. CIDR (Classless Inter-Domain Routing) replaced this with arbitrary prefix lengths, allowing a /23 (510 usable) to fit exactly. Today, CIDR is the standard for all routing and subnetting. When you see “/24” or “255.255.255.0,” you are using CIDR.
Frequently Asked Questions
What does /24 mean in an IP address? It means the first 24 bits of the address are the network portion, leaving 8 bits for hosts. A /24 network has 256 total addresses, 254 usable.
How do I find my IP range? On Windows, run ipconfig and look at the IPv4 address and subnet mask. On macOS/Linux, use ifconfig or ip addr. The range is the network address (IP with host bits zero) to the broadcast address (host bits one).
Why can’t I use the first and last IP in a range? The first is the network address (identifies the subnet) and the last is the broadcast address (sends to all hosts). Assigning them to a device would cause conflicts.
What is the difference between a subnet mask and a prefix length? They are two notations for the same thing. A prefix length /24 equals the subnet mask 255.255.255.0. Both tell you how many bits are in the network portion.
Can I use any IP range I want? For private networks, you can use any of the reserved private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). For public internet-facing addresses, you must use addresses assigned by your ISP or regional registry—you cannot invent them.
What is the maximum number of devices on a /24 network? 254 devices, because the total 256 addresses include the network and broadcast addresses. If you need more, use a /23 or smaller prefix.
Related
Formula used
in ip | IP address | - | 192.168.1.0 | 0 | 4294967295 in prefix | Prefix length | bits | 24 | 0 | 32 out range | Usable IP range | - | ip + 1 | 0 out broadcast | Broadcast address | - | ip + (2^(32-prefix)) - 1 | 0 out total | Total addresses | - | 2^(32-prefix) | 0 out usable | Usable addresses | - | max(0, 2^(32-prefix) - 2) | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Gadgets After Support Ends: Do They Improve?
- Delete Google Search Results About You
- OnePlus Buds Pro 3 Price Drop: Are They Worth It?
- Cloud Migration Ways to Prepare
- Remote Work Productivity Hacks That Actually Work
- Epic Games Removes Dark and Darker? Fact Check