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 192.168.1.0/24

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

254 Usable hosts
/24 255.255.255.0
256 Addresses in total

24 network bits 8 host bits

Network address192.168.1.0/24
Mask255.255.255.0
Wildcard mask0.0.0.255
Broadcast address192.168.1.255
Address range192.168.1.0 - 192.168.1.255
First host192.168.1.1
Last host192.168.1.254
Addresses in total256
Usable hosts254
Legacy classC

See details for 192.168.1.0

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