CIDR calculator
Computes the network of an IPv4 or IPv6 CIDR block, its first and last address, the number of addresses, the netmask and host mask (IPv4) and whether the input had host bits set, as in 192.0.2.5/24.
Updated 2026-10-27
What this tool checks
For an IPv4 or IPv6 block in CIDR form, such as 192.0.2.0/24 or 2001:db8::/32, the tool computes:
- the network and its prefix length,
- the first and the last address,
- the number of addresses,
- the netmask and host mask (IPv4),
- whether the input had host bits set.
A bare address counts as a single-host block, /32 or /128.
How to read the result
The network row is the form to use in configuration files. Use the subnet calculator to split a block, and the IP in CIDR check to test addresses against it.
Limitations
- Nothing is looked up: the tool does not say who holds the block.
Use it from code
API reference for CIDR calculator
curl -i "https://api.lookproof.dev/v1/ip/cidr?cidr=192.0.2.5%2F24"A request without payment is answered with 402 Payment Required and the exact price. See the API reference.
Limits
| Input | Network (CIDR) |
|---|---|
| Deadline | 2 seconds |
| Freshness | Computed from the input; nothing is looked up |
| Price | $0.002 per check |
Findings this tool can report
IP addresses (1)
- Info
IP_HOST_BITS_SETThe network was given with host bits set.
Frequently asked questions
What does host bits set mean?
In 192.0.2.5/24 the part before the slash is not the first address of the network. The network is 192.0.2.0/24. IP_HOST_BITS_SET points this out, because many configuration files reject that form.
Why is the size shown as text?
An IPv6 block can hold up to 2 to the power of 128 addresses, more than many programs can store in a number, so the size is a string of digits.
Is there a netmask for IPv6?
IPv6 is written with prefix lengths only, so the netmask and host mask are shown for IPv4 blocks and left empty for IPv6.