CIDR / Subnet Calculator

Calculate network/broadcast addresses, host range, and mask from a CIDR block

Subnet details

CIDR notation

192.168.1.0/24

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

Usable hosts

254

Total addresses

256

IP class

C

Binary IP

11000000.10101000.00000001.00001010

Binary subnet mask

11111111.11111111.11111111.00000000

An IPv4 CIDR and subnet calculator. Enter an address with a prefix or subnet mask and get the network address, broadcast address, subnet and wildcard masks, usable host range, total address count, and binary representation — all computed locally.

What input formats does it accept?
CIDR notation (192.168.1.10/24), an IP address plus a dotted subnet mask (192.168.1.10 255.255.255.0), or a bare IP address (treated as a /32, a single host).
Why do /31 and /32 show different usable host counts than the normal formula?
The usual "total addresses minus 2" rule assumes a separate network and broadcast address. A /32 is a single address with no separate network/broadcast, so it has 1 usable host. A /31 is a point-to-point link (RFC 3021) where both addresses are usable with no broadcast address reserved, so it has 2.
What is the wildcard mask, and how is it different from the subnet mask?
The wildcard mask is the bitwise inverse of the subnet mask — it's the format Cisco access control lists and OSPF configuration expect instead of a regular subnet mask (e.g. 0.0.0.255 instead of 255.255.255.0 for a /24).
Is this only for IPv4?
Yes, currently only IPv4 — IPv6 prefix calculations work differently and aren't covered here.