IP & Domain Tools

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 110
IP octet 21
IP octet 377
IP octet 49
Octet 110
Octet 21
Octet 364
Octet 40
Prefix length (/n)18
  1. 10.1.77.9 against 10.1.64.0/18: the block runs 10.1.64.0 to 10.1.127.255.
  2. Result: Inside the subnet.

Result:

ResultInside the subnet
Subnet range start10.1.64.0
Subnet range end10.1.127.255
Offset from network address3,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

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.