Subnet Calculator

Enter an IPv4 address with a /prefix or netmask to get the network, broadcast, wildcard, usable host range and count, and split it into smaller subnets.

Interactive calculator · Method IPV4-SUBNET-1.0 · Last reviewed: 2026-11-04

Calculate your scenario

The mask has the first n bits set (/n).

Your inputs

Try an example

Default worked example. Edit the inputs to calculate your scenario.

Default worked example

Network address 192.168.1.0/24
Broadcast address 192.168.1.255
Subnet mask 255.255.255.0 (/24; wildcard 0.0.0.255)
Usable host range 192.168.1.1 – 192.168.1.254
Usable hosts 254 of 256 addresses
Address class and range Class C (historical); private (RFC 1918)

Network = 192.168.1.10 AND 255.255.255.0 = 192.168.1.0; last address = network OR wildcard 0.0.0.255 = 192.168.1.255; 2^(32 − 24) = 256 addresses.

How to use the calculator

Type an IPv4 address and either its prefix length or its dotted subnet mask. To plan smaller subnets, enter the longer prefix to split into.

What the result means

192.168.1.10/24 sits in network 192.168.1.0 with broadcast 192.168.1.255, leaving 254 usable host addresses from .1 to .254 in private RFC 1918 space.

Formula and units

The mask has the first n bits set (/n). Network address = IP AND mask; broadcast = network OR wildcard, where the wildcard is the inverted mask. A /n block holds 2^(32 − n) addresses; usable hosts are that number minus 2 (network and broadcast), except /31, where both addresses are usable on a point-to-point link (RFC 3021), and /32, a single host. Splitting into /m gives 2^(m − n) subnets of 2^(32 − m) addresses each.

Worked examples

192.168.1.10/24: IPv4 address: 192.168.1.10 dotted decimal; Prefix length (CIDR /n): 24 bits; Subnet mask instead of prefix (optional, e.g. 255.255.255.0): dotted decimal; Split into subnets of prefix /n (0 = no split): 0 bits.
Example result: Network address: 192.168.1.0/24; Broadcast address: 192.168.1.255; Subnet mask: 255.255.255.0 (/24; wildcard 0.0.0.255); Usable host range: 192.168.1.1 – 192.168.1.254; Usable hosts: 254 of 256 addresses; Address class and range: Class C (historical); private (RFC 1918).

10.20.30.40/20 split into /22 subnets: IPv4 address: 10.20.30.40 dotted decimal; Prefix length (CIDR /n): 20 bits; Subnet mask instead of prefix (optional, e.g. 255.255.255.0): dotted decimal; Split into subnets of prefix /n (0 = no split): 22 bits.
Example result: Network address: 10.20.16.0/20; Broadcast address: 10.20.31.255; Subnet mask: 255.255.240.0 (/20; wildcard 0.0.15.255); Usable host range: 10.20.16.1 – 10.20.31.254; Usable hosts: 4,094 of 4,096 addresses; Address class and range: Class A (historical); private (RFC 1918).

Limitations and common mistakes

IPv4 only; IPv6 is not handled. Address classes are historical labels shown for reference; routing today is classless. The range note names well-known special-purpose blocks (private, loopback, link-local, shared, documentation, multicast, reserved) and is not a full registry lookup. A mask entry overrides the prefix field. The subnet table lists at most the first 8 subnets.

Assigning the network or broadcast address to a device on a normal subnet; only the addresses between them are usable hosts.

Sources and assumptions

Method IPV4-SUBNET-1.0; last formula review 2026-11-04. Sources and their supported claims. Calculation methodology.