IP Tools

IP Subnet Calculator

Enter an address and prefix to get the network, broadcast address, usable hosts and size of an IPv4 subnet, or the range of an IPv6 prefix.

Jump to tool

Type a mask such as 255.255.255.0 or a prefix such as /24; the prefix list updates to match.

Mask: 255.255.255.0

Typical IPv4 subnets (CIDR reference)

PrefixSubnet maskUsable hosts
/1128.0.0.02,147,483,646
/2192.0.0.01,073,741,822
/3224.0.0.0536,870,910
/4240.0.0.0268,435,454
/5248.0.0.0134,217,726
/6252.0.0.067,108,862
/7254.0.0.033,554,430
Class A/8255.0.0.016,777,214
/9255.128.0.08,388,606
/10255.192.0.04,194,302
/11255.224.0.02,097,150
/12255.240.0.01,048,574
/13255.248.0.0524,286
/14255.252.0.0262,142
/15255.254.0.0131,070
Class B/16255.255.0.065,534
/17255.255.128.032,766
/18255.255.192.016,382
/19255.255.224.08,190
/20255.255.240.04,094
/21255.255.248.02,046
/22255.255.252.01,022
/23255.255.254.0510
Class C/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2540
/32255.255.255.2550

What Is an IP Subnet Calculator?

An IP subnet calculator works out the details of a network from an address and its prefix length: which addresses belong to the subnet, where it starts and ends, and how many hosts it can hold. It saves doing binary arithmetic by hand when you plan a network or write firewall rules.

For IPv4, enter an address and prefix such as 192.168.1.10/24 to get the network address, broadcast address and usable host range. The IPv6 tab returns the subnet address, the first and last addresses and the total address count. Everything runs in your browser.

How to Calculate a Subnet

  1. Choose IPv4 Subnet Calculator or IPv6 Subnet Calculator.
  2. Enter the IP address and the subnet, as a prefix such as /24 or a mask such as 255.255.255.0.
  3. Select Calculate.
  4. Read the network address, broadcast address, usable host range and host count.

The Parts of an IPv4 Subnet

PartExample for 192.168.1.10/24
Network address192.168.1.0, the first address, which names the subnet
Broadcast address192.168.1.255, the last address, which reaches every host
Usable host range192.168.1.1 to 192.168.1.254
Usable hosts254: the total of 256 minus the network and broadcast addresses
Subnet mask255.255.255.0, the same as the /24 prefix

How Subnetting Works

A prefix such as /24 says how many bits at the start of the address identify the network; the rest identify hosts. Each extra network bit halves the subnet, so a /25 has 128 addresses and a /26 has 64.

To find the network address, keep the network bits of the address and set the host bits to 0; for the broadcast address, set them all to 1.

IPv6 Prefix Sizes

IPv6 subnets are planned differently: there is no broadcast address and hosts are never in short supply.

PrefixTypical use
/64One LAN or VLAN; the standard subnet size, needed for automatic addressing (SLAAC)
/56Often given to a home connection: 256 subnets of /64
/48Often given to a business or site: 65,536 subnets of /64
/128A single address

Planning Tips

  • Leave room to grow: size subnets for about twice today's devices.
  • Use /30 or /31 for point-to-point links between routers.
  • Keep server, user, guest and device networks in separate subnets.
  • Write your plan down, including which ranges are reserved for later.

IP Subnet Calculator FAQ

Splitting a network into different sizes?

Plan several subnets from one block with the VLSM calculator.

VLSM Calculator