Is This IP in the Subnet? Checker
Test an IP against a CIDR block.
Your numbers
Your results
Result
Result
—
Subnet range start
—
Subnet range end
—
Offset from network address
—
Is This IP in the Subnet? Checker by TheCalcTools
How the Is This IP in the Subnet? Checker works
Enter the address to test and the network with its prefix.
Both are converted to 32-bit integers and rounded down to the block size.
If they land on the same network address, the IP is inside.
The formula
Inside if floor(IP / 2^(32−n)) = floor(Network / 2^(32−n))
Worked example
Using the default values shown in the calculator:
| IP octet 1 | 10 |
|---|---|
| IP octet 2 | 1 |
| IP octet 3 | 77 |
| IP octet 4 | 9 |
| Octet 1 | 10 |
| Octet 2 | 1 |
| Octet 3 | 64 |
| Octet 4 | 0 |
| Prefix length (/n) | 18 |
- 10.1.77.9 against 10.1.64.0/18: the block runs 10.1.64.0 to 10.1.127.255.
- Result: Inside the subnet.
Result:
| Result | Inside the subnet |
|---|---|
| Subnet range start | 10.1.64.0 |
| Subnet range end | 10.1.127.255 |
| Offset from network address | 3,337 |
Frequently asked questions
What if the network address I typed is not the true network address?
The calculator rounds it down to the real network address of the block, so it still gives the right answer.
Sources and further reading
Related calculators
More in IP & Domain Tools · All calculators
This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.
