Network / CIDR Calculator
Free network calculator for CIDR notation and subnet masks. Calculate network and broadcast addresses, host ranges, and split subnets.
| Network address | |
| Broadcast address | |
| Subnet mask | |
| Wildcard mask | |
| First usable host | |
| Last usable host | |
| Total addresses | |
| Usable hosts | |
| IP class | |
| Address type |
Subnet mask (binary) Split into subnets
How CIDR and subnet masks work
An IPv4 address is 32 bits, normally written as four decimal octets (e.g. 192.168.1.10). A CIDR prefix like /24 splits those 32 bits into a fixed network portion and a variable host portion โ the prefix number is how many bits (from the left) belong to the network. Everything after the network bits identifies an individual host within that subnet.
Worked example: 192.168.1.0/24
A /24 prefix fixes the first 24 bits, leaving 8 bits for hosts โ that's 2โธ = 256 total addresses. The subnet mask is 255.255.255.0. The network address (all host bits 0) is 192.168.1.0, and the broadcast address (all host bits 1) is 192.168.1.255. That leaves 254 usable host addresses, from 192.168.1.1 to 192.168.1.254.
Frequently asked questions
What does CIDR notation mean?
CIDR (Classless Inter-Domain Routing) notation writes an IP address together with a prefix length, e.g. 192.168.1.0/24. The number after the slash is how many leading bits of the 32-bit address are fixed as the network portion โ the remaining bits identify hosts within that network. A /24 fixes 24 bits, leaving 8 bits (256 addresses) for hosts.
How do I calculate the subnet mask from a CIDR prefix?
The subnet mask has as many leading 1 bits as the CIDR prefix number, with the rest set to 0. A /24 prefix is 11111111.11111111.11111111.00000000 in binary, which is 255.255.255.0. A /16 prefix is 255.255.0.0, and a /8 prefix is 255.0.0.0.
What are the network address and broadcast address?
The network address is the first address in a subnet, with all host bits set to 0 โ it identifies the subnet itself and can't be assigned to a device. The broadcast address is the last address, with all host bits set to 1, used to send a message to every device on that subnet. Neither is normally usable as a host address.
How many usable host addresses does a subnet have?
A subnet with n host bits has 2โฟ total addresses, minus 2 for the network and broadcast addresses, giving 2โฟ โ 2 usable host addresses. A /24 has 8 host bits: 2โธ = 256 total, so 254 usable. A /30 has 2 host bits: 4 total, so 2 usable โ the smallest practical point-to-point subnet.
What is the difference between a network address and a broadcast address?
The network address identifies the subnet as a whole (all host bits 0); the broadcast address reaches every host on it at once (all host bits 1). Everything strictly between them is an assignable host address.