IP Subnet Calculator

This calculator returns a variety of information regarding Internet Protocol version 4 (IPv4) and IPv6 subnets including possible network addresses, usable host ranges, subnet masks, and IP classes.

IPv4 Subnet Calculator

Result 💾 save
Network Address Usable Host Range Broadcast Address
Network Class
Subnet
IP Address

IPv6 Subnet Calculator

Result 💾 save
Prefix Length
IP Address

What is a Subnet?

A subnet is a logical subdivision of an IP network (internet protocol suite). The act of dividing a network into at least two separate networks is called subnetting. Routers are devices that allow traffic exchange between subnetworks, serving as a physical boundary.

IPv4 is the most common network addressing architecture used, though the use of IPv6 has been growing steadily since 2006 to address the exhaustion of IPv4 addresses.

How IP Addresses Work

An IP address is comprised of two parts: a network number (routing prefix) and a rest field (host identifier). A rest field is an identifier that is specific to a given host or network interface on that subnet.

A routing prefix is often expressed using Classless Inter-Domain Routing (CIDR) notation for both IPv4 and IPv6. CIDR is a method used to create unique identifiers for networks. For IPv4, networks can also be characterized using a subnet mask, which is expressed in dot-decimal notation (e.g., 255.255.255.0).

All hosts on a subnetwork have the same network prefix, unlike the host identifier, which is a unique local identification. In IPv4, these subnet masks are used by computers to differentiate the network number from the host identifier. In IPv6, the network prefix performs a similar function as the subnet mask in IPv4, with the prefix length representing the number of bits in the address.

IPv4 Classes vs. CIDR Notation

Prior to the introduction of CIDR, IPv4 network prefixes were strictly obtained from the IP address based on its Class (A, B, or C). Since the introduction of CIDRs, assigning an IP address to a network interface requires both an address and its network mask to allow for more flexible network sizing.

IPv4 Subnet Cheat Sheet

Below is a table providing typical subnets for IPv4 and their usable host capacities.

Prefix Size (CIDR) Network Mask Usable Hosts per Subnet Legacy Class
/8255.0.0.016,777,214Class A
/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
/16255.255.0.065,534Class B
/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
/24255.255.255.0254Class C
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522Point-to-Point
/31255.255.255.2540
/32255.255.255.2550Host Route