b2KIT

Subnet Calculator

Calculate subnet masks, network addresses, broadcast addresses, and host ranges for IPv4 and IPv6 CIDR blocks.

Tested tool guide Tested browser tools Checked August 16, 2026

What Subnet Calculator does, with a checked example

A CIDR block becomes a set of concrete IPv4 or IPv6 boundaries: its network address, mask or prefix length, final address, and the IPv4 broadcast and host interval where applicable. Entering a host address with a prefix is valid; the calculator clears the host bits to find the containing subnet. The common surprise is that 192.168.1.10/24 falls within 192.168.1.0/24, rather than defining a network beginning at .10. IPv6 results differ because IPv6 has no broadcast address.

Worked example

A concrete input and expected output from the current implementation.

Input

192.168.1.10/24

Expected output

Network address: 192.168.1.0
Subnet mask: 255.255.255.0
Broadcast address: 192.168.1.255
Host range: 192.168.1.1 - 192.168.1.254

A /24 fixes the first 24 bits and leaves 8 host bits. Setting those 8 bits to zero gives .0, setting them to one gives .255, and the conventional usable IPv4 host range lies between those addresses.

How the result is produced

1

CIDR boundary calculation

CIDR combines an address with a slash prefix. For IPv4, the prefix is 0 through 32; for IPv6, it is 0 through 128. The network address has every bit after that prefix set to zero. The final address has those bits set to one. An IPv4 subnet mask expresses the same prefix as four decimal octets.

2

Family-specific results

For an ordinary IPv4 subnet, the all-zero host value is the network address and the all-one host value is the directed broadcast address; the conventional host interval lies between them. IPv6 has no broadcast address, so its upper boundary is only the last numeric address in the prefix. These results describe address space, not actual routing or assignment.

Good uses

  • Check which /27 contains a planned server address before defining a DHCP pool and excluding its IPv4 network and broadcast addresses.
  • Convert an IPv4 prefix such as /20 into the dotted-decimal subnet mask required by an interface, firewall, or network inventory form.
  • Compare two IPv6 interface addresses against a stated prefix length to see whether they fall within the same calculated prefix.

Limits and checks

  • A calculated subnet does not show whether its addresses are assigned, publicly reachable, routed, reserved by local policy, or permitted through a firewall.
  • Usable-host conventions need care for IPv4 /31 and /32 prefixes. RFC 3021 permits both /31 addresses on a point-to-point link, while a /32 represents one address.
  • Do not interpret the last IPv6 address as a broadcast address. An IPv6 range is a numeric prefix span, not an inventory of assignable hosts.

Common questions

Can I enter 192.168.1.10/24 instead of the network address?

Yes. When an interface address includes a prefix length, the containing network is found by clearing its host bits. Both 192.168.1.10/24 and 192.168.1.0/24 therefore produce the network boundary 192.168.1.0/24. The original .10 value can still represent a particular interface address inside that subnet.

Does an IPv6 subnet have a broadcast address and a directly usable host count?

No broadcast address exists in IPv6. The calculator can identify the numeric boundaries and size of an IPv6 prefix, but the upper boundary is not a broadcast destination. A mathematical address count also does not establish how many addresses may be assigned, because deployment rules, reserved meanings, and local address plans still apply.

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