CalculatorBear
English

IP Subnet Calculator

Calculate the network address, broadcast address, host range, subnet mask and usable hosts for any IPv4 address and prefix.

Four numbers 0–255, like 192.168.1.130.

/

0 to 32, for example 24 = 255.255.255.0.

Usable hosts

62

Network address
192.168.1.128/26
Subnet mask
255.255.255.192
Wildcard mask
0.0.0.63
Broadcast address
192.168.1.191
First usable host
192.168.1.129
Last usable host
192.168.1.190
Total addresses
64
IP class
Class C
Address type
Private (RFC 1918)
IP address (binary)
11000000.10101000.00000001.10000010
Subnet mask (binary)
11111111.11111111.11111111.11000000

Results are provided for general information only.

About the IP subnet calculator

An IPv4 address has 32 bits. The CIDR prefix says how many of the leading bits identify the network; the rest identify hosts. The subnet mask is those leading bits set to 1, the wildcard mask is its inverse, and the network address is the IP address with all host bits set to 0.

The broadcast address has all host bits set to 1. The usable range lies between the two. Two special cases follow RFC 3021: a /31 has two usable addresses for point-to-point links, and a /32 is a single host.

Formula

  • Mask = first prefix bits set to 1
  • Network = IP AND mask
  • Broadcast = network OR (NOT mask)
  • Usable hosts = 2^(32 − prefix) − 2 (/31 = 2, /32 = 1)

Example

For 192.168.1.130/26 the mask is 255.255.255.192, the network is 192.168.1.128, the broadcast is 192.168.1.191 and there are 62 usable hosts from 192.168.1.129 to 192.168.1.190.