Skip to content

IP Subnet Calculator — CIDR & Subnet Mask

Section titled “IP Subnet Calculator — CIDR & Subnet Mask”

Enter an IPv4 address and choose a CIDR prefix to find its network range and usable host count.

Enter an IPv4 address to calculate automatically. Example: 192.168.100.10

IP Address
192.168.100.0
CIDR Notation
/24 (255.255.255.0)
Network Address
192.168.100.0
Usable Host IP Range
192.168.100.1 - 192.168.100.254
Broadcast Address
192.168.100.255
Total Number of Addresses
256
Number of Usable Hosts
254
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
Binary Subnet Mask
11111111.11111111.11111111.00000000
IP Class
C
IP Type
Private

/31 provides two addresses; /32 provides one. Neither has a broadcast address.

  1. Enter a dotted-decimal IPv4 address, such as 192.168.100.10.
  2. Choose a subnet mask or CIDR prefix.
  3. Read the updated results immediately, or use a row’s Copy button to copy its value.

Use an IPv4 address with each number between 0 and 255. Do not add extra leading zeros, as in 192.168.001.1.

In /24, the first 24 bits identify the network, leaving 256 addresses in the block. A larger number after the slash means a smaller network range.

A subnet mask identifies the network portion of an IP address. For /24, the mask is 255.255.255.0 and the wildcard mask is 0.0.0.255.

Usually, the first address identifies the network and the last is the broadcast address. For 192.168.100.10/24, these are 192.168.100.0 and 192.168.100.255.

The usual formula is 2^(32 − prefix length) − 2, giving 254 hosts for /24. A /31 provides two point-to-point endpoints, and a /32 represents one address. Counts may include reserved or other addresses that cannot be assigned to devices.

An IPv4 address has 32 bits. Its leading bits place it in one of five historical classes, A–E.

Class Leading bits Address range
A 0 0.0.0.0 – 127.255.255.255
B 10 128.0.0.0 – 191.255.255.255
C 110 192.0.0.0 – 223.255.255.255
D (IP multicast) 1110 224.0.0.0 – 239.255.255.255
E (reserved for future or experimental use) 1111 240.0.0.0 – 255.255.255.255

Today, network boundaries and host counts are determined by CIDR, rather than IP class. For example, 192.168.0.0/23 is valid even though its addresses fall within class C. It contains 512 addresses, usually supporting 510 hosts.

Class D is for multicast, and class E is reserved. The ranges also include special-purpose addresses, such as 127.0.0.0/8 for loopback and 255.255.255.255 for limited broadcast.

The following private address ranges can be used within a LAN. They fall within the historical class A–C ranges.

Historical class Private address range CIDR notation
A 10.0.0.0 – 10.255.255.255 10.0.0.0/8
B 172.16.0.0 – 172.31.255.255 172.16.0.0/12
C 192.168.0.0 – 192.168.255.255 192.168.0.0/16

These are subsets of their respective classes; not every class B address, for example, is private. You can divide these ranges into smaller subnets, such as /24, for home or office networks. Private address definitions (RFC 1918)

IP Type describes the purpose of the address you entered, such as private or loopback. It is separate from IP Class and does not indicate whether the address is reachable.

CIDRSubnet MaskUsable Hosts
/32255.255.255.2551 (single host)
/31255.255.255.2542 (point-to-point)
/30255.255.255.2522
/29255.255.255.2486
/28255.255.255.24014
/27255.255.255.22430
/26255.255.255.19262
/25255.255.255.128126
/24255.255.255.0254
/23255.255.254.0510
/22255.255.252.01,022
/21255.255.248.02,046
/20255.255.240.04,094
/19255.255.224.08,190
/18255.255.192.016,382
/17255.255.128.032,766
/16255.255.0.065,534
/15255.254.0.0131,070
/14255.252.0.0262,142
/13255.248.0.0524,286
/12255.240.0.01,048,574
/11255.224.0.02,097,150
/10255.192.0.04,194,302
/9255.128.0.08,388,606
/8255.0.0.016,777,214
/7254.0.0.033,554,430
/6252.0.0.067,108,862
/5248.0.0.0134,217,726
/4240.0.0.0268,435,454
/3224.0.0.0536,870,910
/2192.0.0.01,073,741,822
/1128.0.0.02,147,483,646
/00.0.0.04,294,967,294

/31 provides two addresses; /32 provides one. Neither has a broadcast address.