Subnet / CIDR Calculator

Enter an IPv4 address and a prefix length (or a dotted subnet mask) to see the network address, broadcast address, usable host range, mask, wildcard, address counts and binary forms. Everything is calculated in your browser.

192.168.1.0/24Class CPrivate

Network address

192.168.1.0

Broadcast address

192.168.1.255

Subnet mask

255.255.255.0

Wildcard mask

0.0.0.255

First usable host

192.168.1.1

Last usable host

192.168.1.254

Total addresses

256

Usable hosts

254

Prefix length

/24

Mask in binary

11111111 11111111 11111111 00000000

Network in binary

11000000 10101000 00000001 00000000

Frequently asked questions

How do I calculate a subnet?

Supply an IPv4 address and a prefix length such as /24. The calculator ANDs the address with the subnet mask to find the network address, then derives the broadcast, host range and counts.

Why subtract two addresses?

On normal networks the first address identifies the network and the last is the broadcast address, so both are removed from the usable host count. Prefixes /31 and /32 are handled as special cases.

Can I paste a dotted subnet mask?

Yes. Enter something like 255.255.255.0 and it is converted to the equivalent /24 prefix.

More from Networking

Browse all 100 tools →

Build custom software with us

From internal tools to full platforms — we deliver end to end.

Was this tool useful?