TR

Home / Guides / What Are an IP Address, CIDR and a Subnet Mask? How Many Addresses Is /24? A Calculation Method

What Are an IP Address, CIDR and a Subnet Mask? How Many Addresses Is /24? A Calculation Method

Updated: November 6, 2026 · AracMerkezi

▶ Open IP / CIDR Subnet Calculator

An IPv4 address is a network address made of 32 bits, written as four dot-separated numbers (such as 192.168.1.10); each number is between 0 and 255. CIDR notation states the size of the network by writing a number after a slash next to the address: 192.168.1.0/24. Instead of memorizing CIDR, this guide shows how to calculate by hand with the block size method and how to split a network into subnets, with examples.

What does /24 mean?

The number after the slash says how many bits of the address belong to the network part; the remaining bits are reserved for devices. /24 means the first 24 bits are the network and the last 8 bits are for devices: 2⁸ = 256 addresses. The general formula: total addresses = 2^(32 − prefix). In every network the first address is the network address and the last is the broadcast address; devices get the addresses other than these two, so usable addresses = total − 2.

CIDRSubnet maskTotal addressesUsable
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

The block size method

Find the “interesting” byte of the mask (the first byte that is not 255). Block size = 256 − that byte. The network address is that byte of the address rounded down to a multiple of the block size.

Example 1: 10.20.30.77/26. The /26 mask is 255.255.255.192; the interesting byte is 192, so the block size is 256 − 192 = 64. The largest multiple of 64 at or below 77 is 64. The network address is 10.20.30.64, the broadcast address is 64 + 63 = 10.20.30.127, and the usable range is 10.20.30.65 – 10.20.30.126 (62 addresses).

Example 2: 172.16.5.200/20. The mask is 255.255.240.0; the interesting byte is the third byte (240) and the block size is 16. The multiple of 16 at or below 5 is 0. The network address is 172.16.0.0, the broadcast address is 172.16.15.255, and there are 4,094 usable addresses. A 5 in the third byte shows that the network covers the 0–15 range in that byte.

Example 3: 192.168.1.10/24. The network is 192.168.1.0, the broadcast is 192.168.1.255, and the usable range is 192.168.1.1 – 192.168.1.254 (254 addresses).

Example 4: An office plan with four sections

We will share the block 192.168.20.0/24 among four sections: 100, 50, 20 and 10 devices. Go from largest to smallest, because large blocks are less flexible given their alignment needs. 100 devices + 2 = 102 addresses, so /25 (128): 192.168.20.0/25 (0–127). For 50 devices, /26: 192.168.20.128/26 (128–191). 20 devices + 2 = 22, the nearest block is 32, so /27: 192.168.20.192/27 (192–223). 10 devices + 2 = 12, the nearest block is 16, so /28: 192.168.20.224/28 (224–239). A total of 128 + 64 + 32 + 16 = 240 addresses are used; the 240–255 range (16 addresses) stays free for later. This method is called variable-length subnet masking (VLSM) and it reduces wasted addresses.

The wildcard mask

Some network devices and access lists use the inverse of the subnet mask, the wildcard mask. You find it by subtracting each byte from 255: the wildcard equivalent of the mask 255.255.255.192 is 0.0.0.63, and for /20 (255.255.240.0) it is 0.0.15.255. A 0 in the wildcard means “this bit must match” and a 1 means “don't care”. Which device uses which is stated in its documentation; mixing them up makes the rule match the wrong scope.

Which prefix for how many devices?

Add the network and broadcast addresses to the device count, then round up. For 50 devices you need 50 + 2 = 52 addresses; the smallest block that fits is 64, which is /26 (62 usable). For 100 devices, /25 (126) is enough. To leave room for growth most teams pick the next block up; that is a choice, not a rule.

Splitting into subnets

To split a /24 network into four equal parts you lengthen the prefix by two bits (/24 → /26). 192.168.10.0/24 splits into these four networks: 192.168.10.0/26, 192.168.10.64/26, 192.168.10.128/26 and 192.168.10.192/26. Each has 62 usable addresses; the total is 4 × 62 = 248, so 6 usable addresses are lost to network and broadcast addresses during the split. Subnet boundaries are multiples of the block size; the address 192.168.10.100 belongs to the second network (64–127).

Is an address inside this network?

Question: is 192.168.1.200 in the network 192.168.1.128/25? The /25 block size is 128; the network spans 128–255, so yes. 192.168.1.100, on the other hand, is in the 0–127 range and is not in this network. This is the check made most often when writing a firewall rule.

Private and special-purpose ranges

Ranges that are not routed directly on the internet and are used in home and corporate networks:

In addition, the 127.0.0.0/8 range points to your own device (localhost), and 169.254.0.0/16 is the link-local range assigned automatically when no address can be obtained. /32 denotes a single address and /31 denotes two-end point-to-point links (RFC 3021); the “−2” rule above does not apply to these two prefixes as is.

Common mistakes

Mini glossary

If you wonder why numbers like 255 and 192 appear in masks, the guide on binary, decimal and hexadecimal number systems shows the 11000000 = 192 example. To see all values in one step, use the IP / CIDR Subnet Calculator; the tool supports IPv4 only.

Frequently asked questions

How many IP addresses is /24?

256 addresses; 254 are usable, excluding the network and broadcast addresses.

What is the /24 subnet mask?

255.255.255.0.

Which CIDR block is enough for 50 devices?

50 devices plus the network and broadcast addresses need 52 addresses; the smallest block that is enough is /26 (64 addresses, 62 usable).

Tools mentioned in this guide

More guides

This article is for general information only and is not legal, financial or medical advice. We are not an official institution.