IP Subnet Calculator

Work out a subnet from any IPv4 address and prefix. Enter an IP and a CIDR length (or a dotted mask) and the calculator shows the network and broadcast address, the usable host range, the subnet and wildcard masks, the host count and the binary breakdown. Free and instant in your browser.

Read the guide: How to Calculate a Subnet Mask
Network
192.168.1.0/24
254 usable hosts · mask 255.255.255.0 · private (RFC 1918)
Network address
192.168.1.0
Broadcast address
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
CIDR prefix
/24
Total addresses
256
Usable hosts
254
IP class
C
Network in binary
11000000.10101000.00000001.00000000
Mask in binary
11111111.11111111.11111111.00000000

How it works

  1. 1

    Enter the IP address

    Type an IPv4 address, or paste a full CIDR such as 192.168.1.0/24 straight into the field.

  2. 2

    Pick the prefix length

    Choose the CIDR prefix from /0 to /32. You can also type a dotted mask like 255.255.255.0 after the slash.

  3. 3

    Read the subnet

    See the network and broadcast addresses, the first and last usable host, the masks, and the host count in one view.

Instant & 100% private — nothing is uploaded

Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.

Frequently asked questions

How many usable hosts are in a subnet?
For a normal subnet it is two to the power of the number of host bits, minus two: one address is reserved for the network and one for the broadcast. A /24 has 8 host bits, so 256 total and 254 usable. The two exceptions are a /31, where both addresses are usable on point-to-point links under RFC 3021, and a /32, which describes a single host.
What is the difference between the subnet mask and the wildcard mask?
The subnet mask marks the network bits with ones (255.255.255.0 for a /24). The wildcard mask is its inverse, marking the host bits with ones (0.0.0.255). Routers and ACLs, particularly on Cisco gear, often want the wildcard form, so the calculator shows both.
Can I enter a dotted mask instead of a CIDR prefix?
Yes. Type the address with the mask after a slash, for example 10.0.0.0/255.255.255.0, and the calculator converts it to the matching prefix. It only accepts contiguous masks, which is what valid subnet masks always are.
Does the calculation happen on a server?
No. The subnet maths runs entirely in your browser, so the addresses you enter are never sent anywhere. That makes it safe to plan internal and private networks, and it keeps working once the page has loaded.