IP & Network Tools

NETOPSIYON IP

CIDR and Subnet Calculations: /24, /31 and IPv6 Examples

Work through network prefixes, address counts, broadcast addresses and usable ranges.

Netopsiyon · Updated: November 24, 2026

What does the number after the slash mean?

In 192.168.1.10/24, /24 means the first 24 bits of the IPv4 address form the network prefix. The remaining eight bits define the address range. Its network is 192.168.1.0 and its last address is 192.168.1.255. There are 2 to the power of 8, or 256, addresses. In a conventional IPv4 subnet, excluding network and broadcast leaves 254 host addresses.

Two addresses in the same /24 share their first three decimal components. However, prefixes such as /23 or /25 do not always align with dots, so counting components can be misleading. The calculation works at the bit level. A subnet mask is another representation of this boundary: /24 corresponds to 255.255.255.0.

Splitting a network into smaller subnets

Dividing 192.168.1.0/24 into two /25 networks produces ranges 192.168.1.0–192.168.1.127 and 192.168.1.128–192.168.1.255. Each has 128 total addresses and, with the conventional network/broadcast exclusions, 126 host addresses. A gateway can use one of those hosts, so the number available to devices depends on your plan.

Which addresses can you use in a provider-assigned /29?

For 203.0.113.10/29, the network is 203.0.113.8 and broadcast is 203.0.113.15. The six addresses .9–.14 are hosts in the conventional IPv4 model. Reserving .9 for the gateway leaves .10, .11, .12, .13 and .14 for devices. If .14 is the gateway, the device range becomes .9–.13.

The gateway cannot be learned from CIDR arithmetic alone. The provider's actual gateway takes precedence over a first-host or last-host suggestion. Routed blocks can have an off-block gateway and may need a special route or on-link configuration. Enter the supplied gateway in the calculator to exclude it from the device pool when it is inside the block. Also check for other provider-reserved addresses.

Why are /31 and /32 different?

A /31 point-to-point link can use both addresses, so subtracting two from every IPv4 address count is incorrect. A /32 identifies one IPv4 address. The calculator handles these separately. Confirm that your hardware and deployment support the intended addressing model.

IPv6 calculations

IPv6 uses 128 bits. A /64 leaves 64 address bits and has a mathematical total of 18,446,744,073,709,551,616 addresses. IPv6 has no broadcast. This total does not mean every address can be assigned without qualification; special addresses and protocol rules still apply.

The subnet tool calculates numeric boundaries and ranges. It does not check Internet routing, whether an address is free, or whether it is assigned to your organization. After planning, verify address conflicts, routing and DHCP scopes separately.

Calculate an IPv4 / IPv6 subnet · Technical reference: CIDR, RFC 4632

← All guides