Subnet Calculator

Calculate the network address, broadcast address, usable IP range and host count from an IP address with a prefix (CIDR) or netmask. IPv4 and IPv6 supported.

2001:db8::/48 IPv6 · reserved

IP address2001:db8::
Network address2001:db8::/48
Full notation2001:0db8:0000:0000:0000:0000:0000:0000
Usable range2001:db8:: –
2001:db8:0:ffff:ffff:ffff:ffff:ffff
Total addresses1,208,925,819,614,629,174,706,176
Number of /64 subnets65,536

How to Use the Subnet Calculator

The subnet calculator works out everything about a network from an IP address and a prefix length or subnet mask. It supports both IPv4 and IPv6 and accepts input in these formats:

  • CIDR notation: 192.168.1.10/24 or 2001:db8::1/48
  • IP address and mask: 192.168.1.10 255.255.255.0
  • IP address only: without a prefix, /24 is assumed for IPv4 and /64 for IPv6.

For IPv4 you get the network address, broadcast address, first and last usable host, subnet mask, wildcard mask, total and usable address counts, address class (A–E), whether the range is private or public, and a binary view. For IPv6 you get the network address in compressed and full notation, the address range, the exact number of addresses and how many /64 subnets the block contains.

What Are CIDR Notation and Subnet Masks?

An IPv4 address is 32 bits long. The number after the slash in CIDR notation tells you how many of those bits identify the network; the remaining bits are left for hosts. For example, /24 means the first 24 bits belong to the network, which corresponds to the mask 255.255.255.0. The total number of addresses in a subnet is 2(32 − prefix).

The first address of every subnet is the network address and the last one is the broadcast address. Neither can be assigned to a device, which is why the number of usable hosts is two less than the total. There are two exceptions: in a /31, used for point-to-point links, both addresses are usable (RFC 3021), and a /32 refers to a single host. The wildcard mask is the inverse of the subnet mask (0.0.0.255 for a /24) and is used in Cisco access lists (ACLs) and OSPF configuration.

Example: 192.168.1.10/26

A /26 has the mask 255.255.255.192 and splits the network into blocks of 64 addresses. 192.168.1.10 falls into the first block, so the network address is 192.168.1.0, the broadcast address is 192.168.1.63, and the 62 addresses from 192.168.1.1 to 192.168.1.62 can be assigned to devices.

Splitting a /24 into Four Subnets

To divide 192.168.1.0/24 into four equal parts, extend the prefix by 2 bits to /26. That gives you 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26 and 192.168.1.192/26, each with 62 usable addresses. The general rule: every extra prefix bit doubles the number of subnets and halves the number of addresses in each one.

IPv4 CIDR Cheat Sheet

PrefixSubnet maskTotal addressesUsable hosts
/8255.0.0.016,777,21616,777,214
/9255.128.0.08,388,6088,388,606
/10255.192.0.04,194,3044,194,302
/11255.224.0.02,097,1522,097,150
/12255.240.0.01,048,5761,048,574
/13255.248.0.0524,288524,286
/14255.252.0.0262,144262,142
/15255.254.0.0131,072131,070
/16255.255.0.065,53665,534
/17255.255.128.032,76832,766
/18255.255.192.016,38416,382
/19255.255.224.08,1928,190
/20255.255.240.04,0964,094
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

IP Address Classes and Private Ranges

Classful addressing became obsolete when CIDR arrived in 1993, but the classes are still widely referenced: addresses whose first octet is 0–127 are Class A, 128–191 Class B and 192–223 Class C. Class D (224–239) is reserved for multicast and Class E (240–255) for experimental use. Home and office networks use the private ranges below, and carriers have a shared range of their own; none of them are routed on the public internet:

  • 10.0.0.0/8: 10.0.0.0 – 10.255.255.255
  • 172.16.0.0/12: 172.16.0.0 – 172.31.255.255
  • 192.168.0.0/16: 192.168.0.0 – 192.168.255.255
  • 100.64.0.0/10: shared address space that carriers use for CGNAT

IPv6 Subnets

IPv6 addresses are 128 bits long, and the standard subnet size on a local network is /64: SLAAC, the method devices use to configure their own addresses, depends on it. A single /64 contains 264, or 18,446,744,073,709,551,616 addresses. ISPs typically assign customers a block somewhere between /48 and /64; a /56 holds 256 /64 subnets and a /48 holds 65,536. Because runs of zero groups can be shortened to ::, the calculator shows the network address in both compressed and full notation. Want to know whether your connection supports IPv6? Check our IPv6 test.

Subnet Calculator FAQ

How many IP addresses are in a /24 subnet?

A /24 contains 256 addresses in total. Because the network address and the broadcast address can't be assigned to devices, 254 are usable. Its subnet mask is 255.255.255.0.

What does the subnet mask 255.255.255.0 mean?

It means the first 24 bits of an IP address identify the network and the last 8 bits identify devices, which is /24 in CIDR notation. For example, devices on 192.168.1.0/24 can use the addresses from 192.168.1.1 to 192.168.1.254.

Why are there two fewer usable hosts than total addresses?

The first address of every subnet identifies the network itself (the network address), and the last one is used to reach every device on it at once (the broadcast address), so neither can be assigned to a device. There are two exceptions: in a /31, used for point-to-point links, both addresses are usable, and a /32 is a single address.

Why does IPv6 use /64 subnets?

When IPv6 devices configure their own addresses with SLAAC, they choose the last 64 bits of the address themselves, so the standard subnet size on a local network is /64. A single /64 holds about 18.4 quintillion addresses, so running out isn't a concern.