Network

Subnet any IPv4 network

Enter an IPv4 address and a CIDR prefix to instantly get the network address, broadcast address, first and last usable host, usable host count, subnet mask and wildcard mask. It handles /31 point-to-point links and /32 host routes correctly, and flags private, public and loopback ranges. Everything runs in your browser — free, no sign-up, nothing is uploaded.

Network

Network
Broadcast
First host
Last host
Usable hosts
Subnet mask
Wildcard mask
Class & scope

All maths runs in your browser with 32-bit unsigned operations — nothing is uploaded.

How to use it

1

Enter an IP address

Type any IPv4 address, or paste a full CIDR like 192.168.1.10/24 — the prefix select updates automatically.

2

Pick a prefix length

Choose anything from /0 to /32. The matching dotted subnet mask is shown next to each prefix.

3

Read the results

Network, broadcast, first and last usable host, host count, wildcard mask and address class update live as you type.

Quick reference

Common prefix lengths, their dotted masks and the number of usable hosts (total addresses minus the network and broadcast addresses).

PrefixSubnet maskUsable hosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522

About the subnet calculator

Subnetting splits an IP network into smaller ranges. The prefix length says how many leading bits identify the network; the remaining bits address hosts. This calculator does the binary maths for you and labels private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and loopback (127.0.0.0/8), which is handy for firewall rules, DHCP scopes, VPNs and exam prep.

Questions

Why is the usable host count "minus 2"?

In a normal subnet, the lowest address is the network address and the highest is the broadcast address. Neither can be assigned to a device, so a /24 has 256 addresses but only 254 usable hosts. The exceptions are /31 and /32.

What is a /31?

A /31 contains just two addresses and is used for point-to-point links between routers. RFC 3021 allows both addresses to be assigned to hosts — there is no separate network or broadcast address, so you get 2 usable hosts instead of 0.

CIDR vs class — what is the difference?

Classful addressing (A, B, C) fixed the mask by the first octet: class A was /8, class B /16, class C /24. CIDR replaced this in 1993 and lets any prefix length apply to any address, so classes are now only a historical label. This tool shows both.

Is anything uploaded?

No. All calculations run in your browser with plain JavaScript — no addresses ever leave your device.