IPv4 Subnet Calculator

Network address, broadcast, host range, wildcard mask and binary breakdown for any IPv4 CIDR block.

Accepts 10.0.0.5/26, 10.0.0.5 255.255.255.192, or a bare IP.

Results for 198.51.100.4/31

198.51.100.4/31 is the network in CIDR notation · Documentation (TEST-NET-2) (RFC 5737)
Network address
198.51.100.4
Broadcast address
198.51.100.5
Subnet mask
255.255.255.254
Wildcard mask
0.0.0.1
Total addresses
2
Usable hosts
2 (point-to-point per RFC 3021)
First usable host
198.51.100.4
Last usable host
198.51.100.5
CIDR notation
198.51.100.4/31
IP type
Documentation (TEST-NET-2) (RFC 5737)

How the bits line up

Octets (binary)
IP address11000110001100110110010000000100
Subnet mask11111111111111111111111111111110
Network11000110001100110110010000000100
Broadcast11000110001100110110010000000101

The mask's 31 leading ones select the network portion; the remaining 1 bits are available for hosts.

Keep exploring

See every fact about the /31 subnet mask, plan multiple subnets with the VLSM calculator, or convert ranges on the range-to-CIDR tool.