A /26 subnet has mask 255.255.255.192 (26 one-bits + 6 zero-bits), giving 64 total addresses and 62 usable hosts. For 192.168.10.0/26: network 192.168.10.0, broadcast 192.168.10.63, usable hosts 192.168.10.1 – 192.168.10.62, wildcard mask 0.0.0.63. The general rule: with n host bits you get 2n total addresses and 2n − 2 usable, since network and broadcast are always reserved (/31 point-to-point and /32 single-host links are the exceptions). Type any address below to subnet it.

Subnet an address

Accepts CIDR (192.168.10.0/26), dotted mask (192.168.10.0/255.255.255.192), or a host address with either (192.168.10.35/26 → its network is computed). Prefix /0 to /32.

Advertisement

IPv4 CIDR Cheat Sheet — /8 to /32

CIDRSubnet MaskWildcardTotal AddressesUsable Hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122 (RFC 3021)
/32255.255.255.2550.0.0.011

Usable hosts = total − 2 (network + broadcast) for /0 through /30. A /31 keeps both addresses usable for point-to-point links under RFC 3021, and a /32 is a single host route.

Private & Reserved IPv4 Ranges

BlockRangeUsable HostsDefined By / Use
10.0.0.0/810.0.0.0 – 10.255.255.25516,777,214RFC 1918 — private LANs
172.16.0.0/12172.16.0.0 – 172.31.255.2551,048,574RFC 1918 — private LANs
192.168.0.0/16192.168.0.0 – 192.168.255.25565,534RFC 1918 — home routers
127.0.0.0/8127.0.0.0 – 127.255.255.255RFC 1122 — loopback
169.254.0.0/16169.254.0.0 – 169.254.255.255RFC 3927 — link-local (DHCP failure)
100.64.0.0/10100.64.0.0 – 100.127.255.255RFC 6598 — carrier-grade NAT
224.0.0.0/4224.0.0.0 – 239.255.255.255RFC 1112 — multicast

How IPv4 Subnetting Works

An IPv4 address is 32 bits, split between network bits and host bits. The subnet mask is a wall of 1s (network part) followed by 0s (host part), and CIDR notation just counts the 1s: /26 means 26 network bits, 6 host bits. Three AND operations against the mask give you everything:

Host count follows from the 6 remaining bits: 26 = 64 total addresses, minus the two reserved ones = 62 hosts. The wildcard mask is the inverse of the subnet mask (0.0.0.63 for a /26) — that's what ACLs in Cisco-style syntax match against.

Worked example 1: the /12 trap

Take 172.16.5.9/12. The mask is 255.240.0.0, so only the top 4 bits of the second octet belong to the network: 16 AND 240 = 16, but addresses from 172.16.0.0 through 172.31.255.255 all share the same 12 network bits. The calculator returns network 172.16.5.9 → 172.16.0.0, broadcast 172.31.255.255, usable 172.16.0.1 – 172.31.255.254 — 1,048,576 total addresses, 1,048,574 usable. This is the classic RFC 1918 range people mis-size by treating it as a /16.

Worked example 2: splitting a /24 four ways

Divide 192.168.10.0/24 into 4 equal subnets and each gets 2 more host bits sacrificed: four /26s of 64 addresses. The split table above lists them — .0/26, .64/26, .128/26, .192/26 — each with 62 usable hosts, 248 usable addresses across the whole /24 (4 × 62). Planning rule of thumb: size subnets to your host count plus ~20% headroom, not to round numbers — the wastage between a /27 (30 hosts) and a /26 (62) adds up fast across a large campus.

Sizing a subnet backwards

Need room for 300 hosts? Solve 2n − 2 ≥ 300: n = 9 gives 510 usable (29 = 512, minus 2). So the prefix is 32 − 9 = /23, mask 255.255.254.0. The "need usable hosts" box in the calculator does this math for any count up to 16,777,214.

Frequently Asked Questions

How many usable hosts are in a /26 subnet?

A /26 has 26 mask bits, so 32 − 26 = 6 host bits and 26 = 64 total addresses. The network address and broadcast address are reserved, leaving 62 usable hosts spanning x.x.x.1 through x.x.x.62 in a 255.255.255.192 block. For example, 192.168.10.0/26 runs from 192.168.10.1 to 192.168.10.62, with 192.168.10.63 as broadcast.

How do you calculate the subnet mask from CIDR notation?

The CIDR number counts the leading 1-bits in the 32-bit mask. Write that many 1s, pad the rest with 0s, and read each octet. /26 is 26 ones followed by 6 zeros: 11111111.11111111.11111111.11000000, which is 255.255.255.192. The wildcard (inverse) mask is the complement: 0.0.0.63.

How many /26 subnets fit in a /24?

Four. A /24 has 256 addresses and a /26 has 64, and 256 / 64 = 4. The four subnets are 192.168.10.0/26, 192.168.10.64/26, 192.168.10.128/26, and 192.168.10.192/26, each holding 62 usable hosts — 248 usable addresses across the four combined.

Why does 172.16.5.9/12 belong to the network 172.16.0.0?

A /12 mask is 255.240.0.0 — the second octet is masked to its top 4 bits. ANDing the address 172.16.5.9 with mask 255.240.0.0 gives network 172.16.0.0 because the entire 172.16.0.0/12 private block (RFC 1918) spans 172.16.0.0 through 172.31.255.255: 1,048,576 addresses total, 1,048,574 usable. Any address in that range lands in the same network.

What is the broadcast address used for?

It is the last address in a subnet, with every host bit set to 1 (192.168.10.63 for 192.168.10.0/26). Traffic sent to it reaches all hosts on that subnet, which is how ARP requests and DHCP discovery broadcasts work on IPv4 networks. It cannot be assigned to a device, which is one of the two reserved addresses per subnet.

What is the smallest subnet that fits 300 hosts?

A /23. You need at least 302 addresses (300 hosts plus network and broadcast), and 2(32−23) = 512 total addresses, leaving 510 usable. A /24's 254 usable hosts would be too small. The rule: find the smallest n where 2n − 2 is at least your host count, then the prefix is 32 − n.

Advertisement