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

Result for 172.16.5.128/26

This is a private address (RFC 1918). Such addresses work only inside a local network and are not routed on the internet.

62 Usable hosts
/26 255.255.255.192
64 Addresses in total

26 network bits 6 host bits

Network address172.16.5.128/26
Mask255.255.255.192
Wildcard mask0.0.0.63
Broadcast address172.16.5.191
Address range172.16.5.128 - 172.16.5.191
First host172.16.5.129
Last host172.16.5.190
Addresses in total64
Usable hosts62
Legacy classB

See details for 172.16.5.130

Split into smaller subnets

Pick a target prefix and we will show how this network divides.

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