CIDR and subnet calculator

Normalize an IPv4 or IPv6 CIDR block into its network, mask, inclusive range, address count, and conventional usable range.

Quick answer

A subnet calculation applies a prefix length to an address and returns the normalized network boundary, mask, first and last address, and total size. Host bits in the submitted address are cleared to find the network. IPv4 and IPv6 use the same prefix principle even though their notation and conventional subnet sizes differ.

Calculate a subnet before changing a route or firewall rule

Use the subnet calculator when a host address and prefix must be normalized into the network that actually contains it. The boundary, endpoints, mask, and address count make a proposed rule reviewable. They do not indicate assignment, reachability, or authorization.

Review an allowlist

Normalize every submitted entry and compare inclusive endpoints so a convenient prefix does not silently permit adjacent systems.

Plan a private network

Check overlaps with existing VPN, cloud, and local ranges before assigning devices or publishing a migration plan.

Document IPv6 space

State total addresses and operational subnet convention without applying IPv4 broadcast or subtract-two assumptions.

Follow the result into the next relevant page

Read CIDR and subnetting guide because it explains prefix boundaries and address-count context; Read public IP address lookup because it adds public scope and network context when the range is not private; Read public and private address guide because it separates reusable local space from internet routes.

How to interpret the output

A shorter prefix fixes fewer leading bits and therefore describes a larger range. In IPv4, a /24 contains 256 total addresses; traditional host subnets reserve network and broadcast values, with defined exceptions such as /31 and /32. IPv6 does not use broadcast and should not inherit IPv4’s blanket subtract-two rule.

A reliable checking workflow

Normalize every proposed range before placing it in a route, firewall rule, VPN policy, or cloud network. Compare the first and last values with existing ranges to detect overlap. Record whether a capacity figure means total addresses or conventionally usable IPv4 host addresses, because mixing those definitions causes planning errors.

Key ideas behind cidr and subnet calculator

Subnetting divides an address space into aligned blocks. The address and prefix produce a network boundary; policy then decides how that block is used.

  • Prefix length

    The slash number counts fixed leading bits. A shorter prefix describes a larger range.

  • Normalized network

    Host bits are cleared, so 192.0.2.18/24 belongs to 192.0.2.0/24.

  • Usable addresses

    IPv4 network and broadcast conventions do not apply in the same way to IPv6.

Example: checking a proposed office subnet

An administrator enters 192.0.2.18/24. The calculator returns a range from 192.0.2.0 through 192.0.2.255. That proves the math, not permission to use the example range or the absence of overlap. The administrator must compare the normalized block with the actual routing and DHCP plan.

The boundary that matters

The calculator validates address mathematics; it does not know whether a range is assigned, reachable, safe to scan, or permitted by an organization. A syntactically valid public block may belong to someone else. Network policy, routing, DHCP reservations, and platform-specific reserved addresses require separate review.

How the main entities relate

Core relationships in cidr and subnet calculator
SubjectRelationshipObject
Prefix lengthfixesleading address bits
Subnet calculationclearshost bits
Network policyassigns purpose tothe calculated range