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
11000000.10101000.00000001.0000000011111111.11111111.11111111.00000000/24 — 24 network bits · 8 host bits
Common Subnet Reference
| CIDR | Subnet Mask | Usable Hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
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.