Skip to content
Calcuplay
Tech

IP subnet calculator (IPv4, CIDR)

192.168.1.10/24 is in the network 192.168.1.0, mask 255.255.255.0: 256 addresses, 254 of which can be given to devices, from 192.168.1.1 to 192.168.1.254.

/

Usable addresses

254

Devices from 192.168.1.1 to 192.168.1.254

Network

192.168.1.0/24

Subnet mask

255.255.255.0

Broadcast

192.168.1.255

Wildcard mask

0.0.0.255

Total addresses

256

Private address (RFC 1918 block 192.168.0.0/16).

Network: 24 bits · hosts: 8 bits

Quick challenge

Streak 0Best 0

Test yourself: every answer is computed by the tool, and the wrong choices are the most common traps.

How it works

Formula: Usable addresses = 2^(32 − prefix) − 2

The prefix says how many of the 32 bits identify the network (RFC 4632); the remaining bits number the hosts. A /24 leaves 8 host bits, so 2⁸ = 256 addresses. The network address has every host bit at 0 and the broadcast address every host bit at 1: neither can be given to a device (RFC 1122), which leaves 254. Two exceptions: on a point-to-point link, a /31 uses both of its addresses (RFC 3021), and a /32 is a single address.

Worked examples

  • 192.168.1.10/24

    Network 192.168.1.0, devices from 192.168.1.1 to 192.168.1.254: 254 usable addresses.

  • A /8 such as 10.0.0.0/8

    16,777,214 usable addresses, mask 255.0.0.0.

  • A /26

    62 usable addresses: a quarter of a /24.

Common mistakes

  • Counting 256 devices in a /24.

    The network and broadcast addresses are reserved: 254.

  • Mistaking the mask 255.255.255.0 for a /8.

    255.255.255.0 has 24 bits set to 1: it is a /24. A /8 is 255.0.0.0.

  • Thinking every 172.x address is private.

    The private block 172.16.0.0/12 ends at 172.31.255.255: 172.32.0.1 is public.

Subnet size by prefix

Subnet size by prefix
PrefixMaskAddressesUsable
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/22255.255.252.01,0241,022
/23255.255.254.0512510
/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
/31255.255.255.25422
/32255.255.255.25511

Frequently asked questions

How many devices fit in a /24?

254: a /24 holds 256 addresses, minus the network address (.0) and the broadcast address (.255).

What is the difference between a prefix and a mask?

They say the same thing two ways. /24 means the first 24 bits are 1, written 255.255.255.0 as a mask; /16 is 255.255.0.0 and /20 is 255.255.240.0.

Which IP addresses are private?

RFC 1918 sets aside three blocks for private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They are not routed on the Internet, which is why home routers use them.

Tech calculators

Tech calculators

Other calculators