CIDR / Subnet Calculator
Enter CIDR notation (such as 192.168.1.0/24) or an IP address with a subnet mask to calculate the network address, broadcast address, and the range and number of usable hosts. It also converts between prefix lengths and subnet masks. IPv4 only (IPv6 is not supported).
All calculations run inside your browser, and nothing you enter is sent to our servers.
Subnet calculator
What this tool does
CIDR (Classless Inter-Domain Routing) is a notation that marks the boundary between the network and host portions of an IP address with a number after a slash (the prefix length). For example, 192.168.1.0/24 means the first 24 bits are the network portion. This tool takes CIDR notation and calculates everything you need to know about that network range at once.
Because older devices and OS settings screens sometimes use subnet mask format (such as 255.255.255.0), you can also enter an IP address and subnet mask. Whichever format you use, the tool shows the conversion to the other format as well.
How to read the results
- The network address identifies the network itself and is never assigned to a host (e.g. 192.168.1.0 in 192.168.1.0/24).
- The broadcast address is used to send to every device on the network at once, and is also never assigned to a host (e.g. 192.168.1.255).
- The host address range is the set of addresses that can actually be assigned to devices such as computers and phones.
- The wildcard mask is the subnet mask with every bit inverted, and is used in router access control lists (ACLs) and similar settings.
Frequently asked questions
Do /24 and 255.255.255.0 mean the same thing?
Yes. /24 means the first 24 bits are the network portion, which written as a mask is 255.255.255.0. CIDR notation is more concise and is the modern standard, but device settings screens sometimes still use mask format.
Why is the usable host count 2 less than the total number of addresses?
The first address of each network is reserved as the network address and the last as the broadcast address, so neither can be assigned to a device. The exceptions are /31 (point-to-point links between two devices) and /32 (a single host).
Can it calculate IPv6?
This tool is IPv4 only. CIDR notation is used with IPv6 as well (e.g. 2001:db8::/32), but the address space works quite differently, so it is not supported here.
When would I use this tool?
It gives you an instant view of ranges and host counts when designing a home or office network, configuring routers and firewalls, or choosing CIDR blocks for cloud settings such as AWS VPCs and security groups.