CIDR / Subnet Calculator

Enter an IPv4 CIDR block to calculate network address, broadcast, subnet mask, wildcard mask, host range, and binary representation instantly.

Format: IP/prefix — e.g. 10.0.0.0/8, 172.16.0.0/12, 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

Total Hosts

256

Usable Hosts

254

IP Class

C

Binary Representation

IP Addr11000000.10101000.00000001.00000000
Mask11111111.11111111.11111111.00000000
11111111111111111111111100000000

/2424 network bits · 8 host bits

Common Subnet Reference

CIDRSubnet 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

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated network prefix length. For example, 192.168.1.0/24 means the first 24 bits are the network part and the remaining 8 bits are for hosts, giving 254 usable addresses. It replaced the older classful A/B/C addressing scheme.

How do I calculate the number of usable hosts from a CIDR block?

The formula is 2^(32 − prefix) − 2. For a /24 you get 2^8 − 2 = 254 usable hosts. Two addresses are reserved: the network address (all host bits 0) and the broadcast address (all host bits 1). For /31 and /32 the special rules in RFC 3021 apply.

What is a subnet mask vs a wildcard mask?

A subnet mask has consecutive 1 bits for the network portion and 0 bits for the host portion (e.g. 255.255.255.0 for /24). A wildcard mask is the bitwise inverse of the subnet mask (e.g. 0.0.0.255 for /24) and is commonly used in Cisco ACLs and OSPF configuration to specify which bits matter.

What do the IP address classes (A, B, C, D) mean?

Class A addresses start with 0 (0.x.x.x–127.x.x.x) and support large networks. Class B starts with 10 (128.x.x.x–191.x.x.x) for medium networks. Class C starts with 110 (192.x.x.x–223.x.x.x) for small networks with up to 254 hosts. Class D (224–239) is reserved for multicast and Class E (240–255) for research.

Does this tool send my IP data to a server?

No. All calculations are performed entirely in your browser using JavaScript bit operations. No data is transmitted anywhere. You can use it safely on sensitive internal IP ranges.