IPv4 subnet calculator

Enter a network in CIDR notation, or an address together with its mask. We work out the mask, address range, broadcast address and host count. Everything is computed here — nothing is sent anywhere.

Examples: 192.168.1.0/24 10.0.0.0/8 172.16.5.130/26 81.2.3.4/255.255.255.240

How it works

An IPv4 address is 32 bits. The mask splits them in two: the start identifies the network, the rest identifies a device within it. A /24 means the first 24 bits are the network number, leaving 8 bits for hosts — 256 addresses.

Two of those 256 are taken: the first is the network number, the last is the broadcast address. That is why a /24 gives 254 usable addresses rather than 256. The exceptions are /31 and /32, described above with the result.

Why split a network

Splitting limits broadcast traffic and keeps groups of devices apart — accounting computers away from cameras and printers, say. Smaller subnets also make firewall rules simpler: instead of listing individual addresses, one entry covers a whole range.

The prefixes you meet most often

PrefixMaskHostsTypical use
/30 255.255.255.252 2 A link between two routers.
/29 255.255.255.248 6 A small block of public addresses from an ISP.
/24 255.255.255.0 254 An ordinary home or office network.
/16 255.255.0.0 65 534 A large company network split into VLANs.
/8 255.0.0.0 16 777 214 The whole 10.0.0.0 private range.

Read what an IP address actually is