Subnet and CIDR calculator

Calculate a subnet, cover an IP range exactly or check one address against a CIDR. These tools use address arithmetic without IP lookups.

8.8.8.0/24

Normalized IPv4 network

24 network bits8 host bits
IPv4 has 32 bits. The prefix fixes 24; 8 remain for addresses in the block.
First address
8.8.8.0
Last address
8.8.8.255
Total addresses
256
Prefix length
/24

IPv4 host range

Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Usable addresses
254
First usable
8.8.8.1
Last usable
8.8.8.254

The usable count excludes the network and broadcast addresses. It describes address space, not reachable hosts.

No published network profile is available for this exact CIDR. The boundary calculation is still valid.

IP range to CIDR

Cover an inclusive address range with the smallest exact set of CIDRs. No addresses outside the range are included.

IP range to CIDR

Check IP membership

Check whether one address is inside a CIDR. This checks address boundaries, not network activity.

Check IP membership

Reset

The address is inside this CIDR.

Address to check
192.0.2.4
Network CIDR
192.0.2.0/24

Reading the calculation

An IPv4 /24 keeps 24 bits fixed and leaves 8 bits for addresses within the block: 2^8 = 256 addresses. A /25 leaves 7 bits, so it contains 128. Increasing the prefix length makes the block smaller.

IPv4 /31 point-to-point links use both addresses; a /32 identifies one address. IPv6 has no broadcast address. Documentation blocks such as 192.0.2.0/24 and 2001:db8::/32 do not imply public routability.

The six-address example below needs four CIDR blocks. A single /29 would cover eight addresses, including the address just before the requested range and the one just after it. Those extra addresses matter when the result becomes a firewall rule.

192.0.2.1 – 192.0.2.6

192.0.2.1/32
192.0.2.2/31
192.0.2.4/31
192.0.2.6/32

Membership includes both boundary addresses. The network and IPv4 broadcast addresses are inside the CIDR too. The host-range fields show which addresses the calculator counts as IPv4 hosts.

Full-list access.

For pricing or full-list access, email contact@ipquery.io.

Selected list
Selected records
Records in this list