b2KIT

CIDR Subnet Calculator

Calculate subnet masks, network addresses, broadcast, and host ranges from CIDR notation.

Tested tool guide Tested browser tools Checked August 16, 2026

What CIDR Subnet Calculator does, with a checked example

A CIDR entry combines an IP address with a prefix length, such as 192.168.1.130/26. This calculator expands that notation into the subnet mask, network address, broadcast address, and conventional host range. The prefix determines which leading bits identify the network and how many addresses belong to its block. A frequent surprise is that the entered IP need not be the network address. If it falls inside the block, the calculated network address is the block's lower boundary.

Worked example

A concrete input and expected output from the current implementation.

Input

192.168.1.130/26

Expected output

Subnet mask: 255.255.255.192
Network address: 192.168.1.128
Broadcast address: 192.168.1.191
Host range: 192.168.1.129 - 192.168.1.190

A /26 leaves 6 address bits, producing blocks of 64 addresses. The block containing 192.168.1.130 runs from .128 through .191; excluding those two boundary addresses gives the conventional host range of .129 through .190.

How the result is produced

1

Prefix to subnet mask

The number after the slash is the count of leading network bits. For IPv4, the remaining bits are address positions within the subnet. A /26 prefix therefore has 26 one-bits followed by 6 zero-bits in its mask, which is 255.255.255.192 in dotted-decimal notation.

2

Subnet boundaries

Applying the prefix to the entered address identifies the network boundary. The network address is the lowest address in that aligned block, while the broadcast address is the highest. For an ordinary IPv4 subnet, the displayed host interval lies between those boundaries and excludes both endpoint addresses.

Good uses

  • Translating a firewall or routing CIDR entry into its explicit first and last addresses.
  • Checking the network, broadcast, and candidate host range before configuring an IPv4 interface.
  • Comparing an entered address with a proposed prefix to see which subnet block contains it.

Limits and checks

  • The calculated network address can differ from the address entered because CIDR notation may contain any address within the subnet.
  • Do not apply the ordinary endpoint-exclusion rule blindly to /31 point-to-point links or /32 single-address prefixes; those prefixes have special operational meanings.
  • The calculated interval does not prove that addresses are available, reachable, publicly routed, or permitted by a firewall, DHCP policy, or local reservation.

Common questions

Why is the network address different from the IP address I entered?

The entered address may be located anywhere inside the CIDR block. The prefix fixes the network bits, and the network address is formed by setting all remaining address bits to zero. For example, 192.168.1.130/26 belongs to the block beginning at 192.168.1.128, so those two addresses should not match.

Does the host range show every address I can assign to a device?

No, not necessarily. It shows the conventional interval between the IPv4 network and broadcast addresses. A network may reserve additional addresses for gateways, infrastructure, DHCP exclusions, or policy. Point-to-point /31 prefixes and single-address /32 prefixes also should not be interpreted using the ordinary subtract-two host rule.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools