CIDR Calculator
Enter an IPv4 CIDR block such as 192.168.1.0/24 for its IP range, netmask, broadcast address and usable hosts, split it into subnets or turn a range into CIDR. How it works
Use the CIDR Calculator
About the CIDR Calculator
A /24 block holds 256 addresses and 254 usable hosts. 192.168.1.0/24 runs from 192.168.1.1 to 192.168.1.254, with netmask 255.255.255.0 and broadcast address 192.168.1.255. Type any IPv4 address with a prefix from /0 to /32 to get the same figures, the wildcard mask and, for a special range, its IANA name. The calculator also splits a block into subnets and turns an address range into CIDR blocks. It is IPv4 only.
Common prefix lengths
| Prefix | Netmask | Total addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
Each row is what the calculator returns for 10.0.0.0 with that prefix. Usable hosts are the total minus 2, except /31 (both addresses usable, RFC 3021) and /32 (one host).
192.168.1.0/24 split into /26 subnets
| Subnet | First host | Last host | Broadcast |
|---|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 | 192.168.1.62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 | 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 | 192.168.1.190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 | 192.168.1.254 | 192.168.1.255 |
Split /26, or 50 hosts per subnet, which needs a /26 (62 usable hosts). A split lists the first 64 subnets.
Range 192.168.1.10 to 192.168.1.200 as CIDR blocks
| Block | Addresses |
|---|---|
| 192.168.1.10/31 | 2 |
| 192.168.1.12/30 | 4 |
| 192.168.1.16/28 | 16 |
| 192.168.1.32/27 | 32 |
| 192.168.1.64/26 | 64 |
| 192.168.1.128/26 | 64 |
| 192.168.1.192/29 | 8 |
| 192.168.1.200/32 | 1 |
191 addresses in 8 blocks. Each block is the largest one that starts at the current address, is aligned to its own size and stays inside the range.
How to use this tool
- Type an IPv4 address and a prefix, such as 10.0.0.0/16. A host address such as 192.168.1.77/24 works and gives the block it belongs to.
- Read the netmask, network address, broadcast address, total addresses, usable hosts, and the first and last usable address.
- If a message appears under the field, it names the part that is wrong: one of the four numbers or the prefix. An address with no slash is not an error; it is read as a single host, /32.
- To split the block, type a longer prefix, or the number of hosts each subnet needs, under Split. To go from a list of addresses to blocks, switch to Range to CIDR and enter the first and last address.
Frequently asked questions
- How many usable hosts are in a /24?
- 254. Usable hosts are 2^(32 − prefix) minus 2, because the network address and the broadcast address are not given to hosts. Each bit taken off the prefix doubles the block: a /23 has 512 addresses and 510 usable hosts, while a /25 has 128 and 126.
- What are a /31 and a /32?
- A /31 has 2 addresses, and both are usable because RFC 3021 treats them as host addresses on a point-to-point link, so the tool shows no broadcast address for it. A /32 is a single host. An address typed without a slash is read as /32.
- How do I find the network address of an IP address?
- Type the address with its prefix. 192.168.1.77/24 gives network address 192.168.1.0, because the last 8 bits are cleared. Two addresses are in the same subnet when they give the same network address for the same prefix.
- How many usable IP addresses does an AWS subnet have?
- Fewer than the tool shows. AWS reserves the first four addresses and the last one in every subnet, so a /24 holds 251 usable addresses, not 254. AWS allows subnet sizes only from /28 to /16. A /28 has 16 addresses here and 11 usable in AWS.
- Does the CIDR calculator support IPv6?
- No. It reads four decimal numbers from 0 to 255 and a prefix from 0 to 32, and an IPv6 block such as 2001:db8::/32 gets a message that an IPv4 address has four numbers separated by dots.
- How do I convert an IP range to CIDR?
- Switch to Range to CIDR and enter the first and last address. 192.168.1.10 to 192.168.1.200 is 191 addresses and needs 8 blocks, from 192.168.1.10/31 to 192.168.1.200/32, because a block has to start on a multiple of its own size. A range from 192.168.1.0 to 192.168.1.255 is the single block 192.168.1.0/24.
Related Tools
View all toolsSubnet Mask Calculator
Subnet calculator for IPv4: enter an address and a mask or prefix such as /24 to get the network, broadcast address, host range, usable hosts and wildcard mask.
JWT Decoder
Paste a JSON Web Token to read its header, its payload and the exp, nbf and iat times in UTC. The signature is shown but not checked: nothing is verified.
URL Parser
Split a URL into protocol, user name, password, host, port, path, query and hash, see each query parameter decoded, and whether the port was written.
Query String to JSON
Paste a query string or a full URL to get JSON: repeated keys and key[] become arrays, + and %20 decode to spaces, with optional nesting and number types.
JSON to Query String
Turn a JSON object into a URL query string: arrays as repeated keys, [], [0], a comma list or JSON, nested objects as user[name], user.name or JSON.
Subnet Mask Cheat Sheet
Subnet mask table for every IPv4 prefix from /0 to /32: dotted mask, wildcard, total and usable hosts, with /31 counted as 2 (RFC 3021) and /32 as 1.