The /32 subnet

A /32 subnet uses the mask 255.255.255.255 and holds 1 addresses, 1 of them usable.

Reference data last reviewed:

/32
Prefix length
255.255.255.255
Subnet mask
0.0.0.0
Wildcard mask
1
Usable hosts

The /32 mask is 32 network bits followed by 0 host bits, for a total of 32 bits.

32 network bits (the 1s)0 host bits (the 0s)

Why a /32 has one usable address, not minus one

The usual rule subtracts two addresses from a block, one for the network address and one for the broadcast address. A /32 contains a single address, so there is nothing to subtract: it is not a subnet with hosts in it, it is one exact address.

That is what makes it useful. A /32 in a routing table is a host route pointing at one machine. A /32 in a firewall rule matches one source. A loopback interface is conventionally configured as a /32 so the address belongs to the router rather than to any link.

Calculators that blindly apply total minus two report a /32 as having minus one usable hosts. SubnetKit reports 1, and the API returns the same value, so the web tool, the JSON endpoint and the reference table never disagree.

A /32 is a single IPv4 address. Its mask is 255.255.255.255 and it describes exactly one host, which is why you see /32 on host routes, loopback entries, and firewall rules that match one machine.

Because a /32 has no room for a network or broadcast address, tools count it as one usable address rather than subtracting the usual two. Access lists and routing tables use /32 to pin traffic to a single endpoint.

Below you can see the exact network, broadcast, and host range for any /32 you enter, calculated instantly in your browser.

Calculate a /32 network

Accepts CIDR (192.0.2.0/24), IP + mask (192.0.2.0 255.255.255.0), or a bare IP (defaults to /24).

Network address192.0.2.0
Usable host range192.0.2.0 - 192.0.2.0
Broadcast address192.0.2.0
Usable hosts1
Subnet mask255.255.255.255
Wildcard mask0.0.0.0
CIDR notation192.0.2.0/32
Total addresses1
IP (binary)11000000.00000000.00000010.00000000
Mask (binary)11111111.11111111.11111111.11111111
Try:

Example: 192.0.2.0/32

Taking 192.0.2.0/32 as a worked example, the block breaks down like this:

Network address192.0.2.0
Usable range192.0.2.0 - 192.0.2.0
Broadcast address192.0.2.0
Total addresses1
Usable hosts1
Size1/256 of a class C block

A note on the example: 192.0.2.0 is in 192.0.2.0/24, documentation (test-net-1) space under RFC 5737. Reserved for examples and documentation. Safe to print, never routed. Every example on this site uses reserved space on purpose, so nothing here points at somebody's real network.

Do this from the terminal

The same numbers are available as keyless JSON, and there are good local tools that need no network at all. Naming them costs nothing and is more useful than pretending this page is the only option.

curl -s https://subnetkit.dev/api/cidr/32.json | jq

# or locally, with no network at all:
ipcalc 192.0.2.0/32
sipcalc 192.0.2.0/32

ipcalc ships in most Linux distributions and sipcalc handles IPv4 and IPv6. The SubnetKit API is the one to reach for in a build step or a script that wants the same values this page shows.

Frequently asked questions

What is the subnet mask for a /32?

A /32 uses the subnet mask 255.255.255.255. Its wildcard mask, used in access lists, is 0.0.0.0.

How many hosts are in a /32 subnet?

A /32 has 1 total addresses and 1 usable hosts (the total minus the network and broadcast addresses, except for /31 and /32).

What is a /32 used for?

Single host route. It is equivalent to 1/256 of a class C block.

How do I calculate a /32 network?

Set the host bits to zero for the network address and to one for the broadcast address. The calculator on this page does it for any /32 block you enter.

Opening a port on a /32

A firewall rule needs two halves: the range and the port. The wildcard mask 0.0.0.0 matches this whole block in an access list. For the other half, the port number reference lists what each TCP and UDP port carries and whether it is encrypted by default, so you can tell what you are about to expose to 1 address.

Sources

The arithmetic on this page follows the documents below. Every number is computed from the prefix length rather than stored, and the calculation is covered by tests over all 33 prefixes.

Spotted something wrong? Tell us and it gets corrected. How the data is maintained is described on the about page.