IP Subnet Calculator
This calculator provides a range of details related to Internet Protocol version 4 (IPv4) and IPv6 subnets, including possible network addresses, usable host ranges, subnet masks, IP classifications, and more.
| Network Class: | |
| Subnet (CIDR): | |
| IP Address: |
A subnet is a segmented portion of an IP network (Internet Protocol suite), which is a collection of communication protocols used across the Internet and similar networks. This suite is commonly referred to as TCP/IP (Transmission Control Protocol/Internet Protocol).
Dividing a network into two or more smaller networks is known as subnetting. Routers facilitate communication between these subnetworks and act as the physical boundaries separating them. IPv4 remains the most widely used addressing system, although IPv6 adoption has been steadily increasing since 2006.
An IP address consists of two main parts: a network number (also called the routing prefix) and a host identifier (rest field). The host identifier uniquely identifies a specific device or network interface, while the routing prefix defines the network. This prefix is typically represented using Classless Inter-Domain Routing (CIDR) notation for both IPv4 and IPv6. CIDR enables the creation of unique identifiers for networks and individual devices.
In IPv4, networks can also be defined using a subnet mask, often written in dot-decimal format, as seen in the calculator's "Subnet" field. All devices within the same subnet share the same network prefix, while each has a unique host identifier. The subnet mask separates the network portion from the host portion of the address. In IPv6, the network prefix serves a similar purpose, with the prefix length indicating how many bits are allocated to the network.
Before CIDR was introduced, IPv4 network prefixes were determined based on the address class (A, B, or C), which corresponded to specific IP ranges and default network masks. However, with CIDR, assigning an IP address to a network interface now requires both the IP address and its associated network mask.
Typical Subnets for IPv4
Below is a table providing typical subnets for IPv4.
Class A
| Prefix | Netmask | Hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15 | 255.254.0.0 | 131,070 |
Class B
| Prefix | Netmask | Hosts |
|---|---|---|
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
Class C
| Prefix | Netmask | Hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| /31 | 255.255.255.254 | 0* |
Class D / Other
| Prefix | Netmask | Note |
|---|---|---|
| /32 | 255.255.255.255 | Single host |
| Class D | 224.0.0.0–239.255.255.255 | Multicast |
| Class E | 240.0.0.0–255.255.255.255 | Reserved |
| 10.0.0.0/8 | 255.0.0.0 | Private |
| 172.16.0.0/12 | 255.240.0.0 | Private |
| 192.168.0.0/16 | 255.255.0.0 | Private |
| 127.0.0.0/8 | 255.0.0.0 | Loopback |
* /31 networks are used for point-to-point links (RFC 3021); both addresses are usable.