Skip to main content
IP Range CalculatorPRO
Subnet Math & Set OperationsInstant Client-Side Tool

IP-in-Subnet Checker

Test membership within a CIDR block.

IP-in-Subnet Checker: inputs and results

Enter an IP address, CIDR prefix, or range. Then check its first and last address below.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

Key Capabilities

  • •100% Client-Side: Zero telemetry or server latency.
  • •RFC Compliant: Exact 32-bit and 128-bit integer precision.
  • •Quick Copy: Instant access to CIDR, mask, and range bounds.
  • •Cross-Platform: Works on desktop, tablet, and mobile browsers.

How IP-in-Subnet Checker Works?

This tool works by applying the subnet mask to the test address and comparing the result with the subnet network address.

  1. Enter the CIDR block

    Type a subnet such as 172.16.32.0/20.

  2. Enter test addresses

    Paste the client or host addresses to test.

  3. Mask each address

    The checker computes address AND 255.255.240.0.

  4. Compare networks

    A match with 172.16.32.0 means the address belongs to the subnet.

IP-in-Subnet Checker Formula

The formula is Member = (IP AND Mask) = Network.

Membership

(A AND M) = N

One AND and one comparison.

Equivalent range test

N ≤ A ≤ N + 2^(32−p) − 1

Same answer through integer bounds.

Octet shortcut

floor(octet ÷ block) × block = network octet

For the partial octet of the mask.

Worked example: 172.16.45.9 in 172.16.32.0/20

Mask octet 3 = 240 → block 16
45 AND 240 = 32 (00101101 AND 11110000 = 00100000)
Masked = 172.16.32.0 = network → member ✓

IP-in-Subnet Checker Conversion Table

The table tests 10 addresses against 172.16.32.0/20 (172.16.32.0 – 172.16.47.255).

AddressMasked ValueMember
172.16.32.0172.16.32.0Yes
172.16.32.1172.16.32.0Yes
172.16.45.9172.16.32.0Yes
172.16.47.255172.16.32.0Yes
172.16.48.0172.16.48.0No
172.16.31.255172.16.16.0No
172.16.40.128172.16.32.0Yes
172.17.32.1172.17.32.0No
172.16.0.1172.16.0.0No
172.16.33.33172.16.32.0Yes

What is IP-in-Subnet Checker?

The IP-in-Subnet Checker is a tool that tests whether an IPv4 address belongs to a CIDR block.

Membership tests drive routing decisions, firewall rules, and application access controls. A host decides whether a destination is local with the same test: it masks the destination and compares the result with its own network.

The checker accepts any prefix length from /0 to /32. A /0 contains every address, and a /32 contains only itself.

What are the uses of IP-in-Subnet Checker?

There are 4 main uses of the IP-in-Subnet Checker, including access control checks, routing checks, and log filtering.

  • Checking allow-list coverage

    A client address tested against each allowed CIDR shows which entry admits it.

  • Verifying local delivery

    Two hosts in the same /20 talk directly. A host outside sends traffic through the gateway.

  • Filtering logs by subnet

    Log analysis keeps only events from addresses inside a subnet.

  • Validating VPN client pools

    VPN client addresses must fall inside the assigned pool subnet.