IPv4 subnet calculatorNetwork, host range, broadcast, mask and wildcard for any IPv4 blockIPv6 subnet calculatorPrefix ranges, /64 counts, splits and a ULA prefix generatorVLSM calculatorSize subnets by host count, with AWS, Azure, GCP and OCI rulesVisual subnet plannerSplit and join blocks, label them, then share or export the planCIDR and IP range calculatorTurn any start and end address into the fewest CIDR blocksSupernet and route summarySummarise networks into one route or merge them exactlyWildcard mask calculatorACL wildcards, matched ranges and ready Cisco linesSubnetting practiceExam-style questions, checked instantly with the working shownSubnet mask cheat sheetEvery prefix from /0 to /32 with mask, wildcard and hostsIPv6 cheat sheetPrefix sizes, address types and the reserved rangesGuidesHow subnetting works, explained with worked examples

/31 and /32 subnets: how many hosts, and why

Many calculators say a /31 and a /32 hold zero usable hosts. That has been wrong since 2000. Here is what the standards actually say and where each prefix is used.

Updated Nov 20, 20266 min readFigures tested
Point-to-point link, RFC 3021 Router A10.0.0.0 Router B10.0.0.1 10.0.0.0/31 no network or broadcast address 2 usable addresses, 0 wasted
Key facts
  • A /31 has two addresses and both are usable on point-to-point links (RFC 3021).
  • A /31 has no network address and no broadcast address.
  • A /32 is exactly one address, used for loopbacks and host routes.
  • The IPv6 equivalent of a /31 link is a /127 (RFC 6164).
IPv4 subnet calculator

Network, host range, broadcast, mask and wildcard for any IPv4 block

Open the tool

The old rule and why it breaks

The usual formula for usable hosts is 2host bits − 2. The two subtracted addresses are the network address (all host bits 0) and the broadcast address (all host bits 1). Apply it to a /31, which has one host bit, and you get 2 − 2 = 0. Apply it to a /32 and you get 1 − 2, which makes no sense at all.

The formula assumes a subnet with many hosts that need a broadcast. A link between exactly two routers does not need one: there is only one other device to talk to.

What RFC 3021 changed

RFC 3021, published in December 2000, defines how to use 31-bit prefixes on point-to-point links. On a /31 there is no network address and no broadcast address. Both addresses are ordinary host addresses, one for each end of the link.

PrefixAddressesUsableNetworkBroadcast
/3042YesYes
/3122NoNo
/3211NoNo

The saving is real. A /30 spends four addresses to number two interfaces, and a /31 spends two. On a backbone with hundreds of links, /31 halves the address space used for links.

Configuring a /31

Each router takes one of the two addresses. For 10.0.0.0/31:

! Router A (Cisco IOS)
interface GigabitEthernet0/0
 ip address 10.0.0.0 255.255.255.254

! Router B (Junos)
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/31

Most current router operating systems accept /31 addresses on point-to-point links. Some platforms limit them to certain interface types or print a warning on broadcast media such as Ethernet, so check your platform's documentation before rolling them out.

A /31 is only for links with exactly two devices. Do not use it on a LAN segment that might later gain a third host.

Where /32 is used

A /32 identifies a single address. It never describes a LAN, but it is everywhere in routing and security:

  • Loopback interfaces. Routers use a /32 loopback as a stable router ID and as the source for management and BGP sessions.
  • Host routes. A /32 route sends traffic for one address somewhere specific, such as a load balancer VIP or an anycast service.
  • Firewall and ACL rules. 203.0.113.10/32 or host 203.0.113.10 matches one machine.
  • Cloud security groups. Allowing SSH from your-ip/32 is the common way to limit access to one address.

IPv6: /127 and /128

IPv6 has no broadcast at all, so the question is simpler. RFC 6164 recommends /127 for router-to-router links, which gives two addresses, one per side. A /128 is a single address, used the same way as an IPv4 /32. The IPv6 calculator shows /127 as two addresses.

Why calculators disagree

Several popular subnet calculators still show 0 usable hosts for /31 and /32, or refuse those prefixes entirely. They apply the minus-two rule to every prefix. Our calculator follows RFC 3021: a /31 shows 2 usable addresses with no broadcast, and a /32 shows 1. If you are answering an older exam question that expects the classic answer, note that the question is testing the formula rather than modern practice.

How we check this page

Every figure on this site comes from the same calculation engine as the tools, and that engine is tested on each build against more than 6,600 cases generated by Python's standard ipaddress module. Rules are taken from the RFCs and vendor documents listed under Sources. Last reviewed November 20, 2026.

Sources

  1. RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links
  2. RFC 6164: Using 127-Bit IPv6 Prefixes on Inter-Router Links
  3. RFC 950: Internet Standard Subnetting Procedure