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:
The /32 mask is 32 network bits followed by 0 host bits, for a total of 32 bits.
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).
11000000.00000000.00000010.0000000011111111.11111111.11111111.11111111Example: 192.0.2.0/32
Taking 192.0.2.0/32 as a worked example, the block breaks down like this:
| Network address | 192.0.2.0 |
|---|---|
| Usable range | 192.0.2.0 - 192.0.2.0 |
| Broadcast address | 192.0.2.0 |
| Total addresses | 1 |
| Usable hosts | 1 |
| Size | 1/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.
- RFC 4632: Classless Inter-domain Routing (CIDR), the address assignment and aggregation plan
- RFC 1878: Variable Length Subnet Table for IPv4
- RFC 3021: Using 31-bit prefixes on IPv4 point-to-point links
- RFC 1918: Address allocation for private internets
- RFC 6598: IANA-reserved IPv4 prefix for shared address space (carrier-grade NAT)
- RFC 5737: IPv4 address blocks reserved for documentation
- IANA IPv4 Special-Purpose Address Registry
Spotted something wrong? Tell us and it gets corrected. How the data is maintained is described on the about page.