IP Subnet Calculator – Calculate IPv4 Subnets and CIDR Networks
Use this IP Subnet Calculator to calculate IPv4 subnet information from an IP address and CIDR prefix. The calculator can determine the network address, subnet mask, broadcast address, host range, and number of usable IP addresses for a subnet.
Enter an IPv4 address together with a CIDR prefix such as /24, /16, or /30 to quickly understand the size and range of the network. The calculator is useful for network configuration, IP address planning, subnetting exercises, and learning how IPv4 networks are divided into smaller subnets.
What Can the IP Subnet Calculator Calculate?
The calculator provides detailed information about an IPv4 subnet, including:
- Network address
- Subnet mask
- CIDR notation
- Broadcast address
- First usable host address
- Last usable host address
- Number of usable hosts
- Total addresses in the subnet
- IP address range
- Network and host information
For example, a network such as 192.168.1.0/24 contains 256 total IPv4 addresses, with 254 normally available for hosts.
Whether you are learning subnetting or configuring a real network, this calculator makes it easier to understand how an IP address and CIDR prefix define a network.
IP Subnetting Calculator
Detailed Results:
Please enter an IP address in CIDR format.
CIDR to Subnet Mask Reference Table (IPv4)
| CIDR | Subnet Mask | # of Hosts |
|---|
Understanding IP Subnets and CIDR Notation
What Is an IP Subnet?
An IP subnet, short for IP subnetwork, is a smaller logical network created by dividing a larger IP network into smaller sections. Subnetting helps organize devices, control network traffic, and use IP addresses more efficiently.
Every IP address belongs to a network, but not all devices on the same larger network need to communicate directly with each other. By using subnets, a network can be divided into separate groups while still being managed as part of the same overall network.
For example, a network such as 192.168.1.0/24 contains 256 IPv4 addresses, from 192.168.1.0 to 192.168.1.255. This network can be divided into smaller subnets such as 192.168.1.0/26, with each subnet containing 64 addresses.
How Does Subnetting Work?
Subnetting works by using a subnet mask or CIDR prefix to determine which part of an IP address identifies the network and which part identifies individual devices.
For example:
- IP address: 192.168.1.25
- Subnet mask: 255.255.255.0
- CIDR notation: /24
- Network address: 192.168.1.0
- Usable host addresses: 192.168.1.1–192.168.1.254
- Broadcast address: 192.168.1.255
With a /24 subnet, the first 24 bits identify the network and the remaining 8 bits are available for host addresses.
The number after the slash is called the CIDR prefix length. A larger prefix means a smaller subnet with fewer available host addresses.
Why Is IP Subnetting Important?
Subnetting is an important part of network design because it allows administrators to divide networks according to their needs.
Common reasons for using subnets include:
- Organizing devices into separate networks
- Reducing unnecessary network traffic
- Improving network performance
- Separating departments or network segments
- Improving network security
- Using IP address space more efficiently
- Creating smaller networks for specific purposes
For example, a company could use separate subnets for employees, servers, guest Wi-Fi, printers, and other network devices. This makes the network easier to manage and can also help control which devices are allowed to communicate with each other.
IP Subnetting and CIDR Notation
CIDR notation provides a simple way to describe an IP network. It consists of an IP address followed by a slash and a prefix length.
For example:
192.168.1.0/24
The /24 indicates that 24 of the 32 bits in an IPv4 address are used for the network portion. The remaining 8 bits are available for host addresses.
Some common IPv4 subnet sizes include:
| CIDR | Total Addresses | Usable Host Addresses* |
|---|---|---|
| /24 | 256 | 254 |
| /25 | 128 | 126 |
| /26 | 64 | 62 |
| /27 | 32 | 30 |
| /28 | 16 | 14 |
| /29 | 8 | 6 |
| /30 | 4 | 2 |
*Traditional IPv4 subnetting reserves the network address and broadcast address, so the number of usable host addresses is normally two fewer than the total number of addresses.
Use our IP Subnet Calculator above to quickly calculate subnet masks, network addresses, broadcast addresses, host ranges, and the number of available addresses for an IPv4 network.
How to Calculate an IP Subnet
Calculating an IP subnet involves determining the network address, broadcast address, usable host range, subnet mask, and number of available addresses. The CIDR prefix tells you how many bits are reserved for the network portion of the IPv4 address.
For example, consider the network:
192.168.1.0/26
A /26 prefix means that 26 of the 32 bits in an IPv4 address are used for the network portion. This leaves 6 bits for host addresses.
Step 1: Determine the Subnet Mask
A /26 subnet corresponds to the subnet mask:
255.255.255.192
The subnet mask determines which part of the IP address identifies the network and which part identifies individual hosts.
Step 2: Calculate the Number of Addresses
The number of IPv4 addresses in a subnet can be calculated using:
2^(32 − prefix length)
For a /26 subnet:
2^(32 − 26) = 2^6 = 64 addresses
Therefore, a /26 subnet contains 64 total IPv4 addresses.
Step 3: Calculate Usable Host Addresses
In a traditional IPv4 subnet, the first address is normally reserved as the network address, while the last address is used as the broadcast address.
Therefore:
64 − 2 = 62 usable host addresses
A /26 subnet can therefore normally provide 62 usable IPv4 host addresses.
Step 4: Find the Network Address
For the network 192.168.1.0/26, the network address is:
192.168.1.0
This identifies the subnet itself rather than an individual device.
Step 5: Find the Broadcast Address
The broadcast address is the final address in the subnet:
192.168.1.63
The broadcast address can be used to send traffic to all hosts on the subnet.
Step 6: Determine the Usable Host Range
The usable host addresses are the addresses between the network and broadcast addresses:
192.168.1.1 – 192.168.1.62
This gives the subnet 62 addresses that can normally be assigned to devices.
Example Subnet Calculation
For 192.168.1.0/26:
| Property | Result |
|---|---|
| Network | 192.168.1.0 |
| Subnet Mask | 255.255.255.192 |
| CIDR | /26 |
| Total Addresses | 64 |
| Usable Hosts | 62 |
| First Usable Address | 192.168.1.1 |
| Last Usable Address | 192.168.1.62 |
| Broadcast | 192.168.1.63 |
Calculating subnet information manually can be useful for understanding how IP networks work, but an IP Subnet Calculator makes the process much faster and reduces the risk of calculation errors.
Enter an IPv4 address and subnet or CIDR prefix into the calculator above to instantly determine the corresponding network information.
Subnet Mask vs. CIDR Notation
A subnet mask and CIDR notation describe the same basic information in different formats. Both indicate which portion of an IPv4 address represents the network and which portion is available for hosts.
For example:
255.255.255.0 = /24
The subnet mask uses four decimal numbers, while CIDR notation uses a slash followed by the number of network bits.
Common IPv4 Subnet Masks
The following table shows some commonly used IPv4 subnet masks and their corresponding CIDR prefixes:
| CIDR Prefix | Subnet Mask | Total Addresses | Usable Hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
The number of usable hosts shown above follows the traditional IPv4 convention of reserving one address for the network and one for the broadcast address.
What Does the CIDR Number Mean?
The number after the slash represents the number of bits used for the network portion of the address.
For example:
192.168.1.0/24
The /24 means that 24 of the 32 bits in the IPv4 address identify the network. The remaining 8 bits are available for host addresses.
A larger CIDR prefix creates a smaller subnet:
- /24 → 256 total addresses
- /25 → 128 total addresses
- /26 → 64 total addresses
- /27 → 32 total addresses
- /28 → 16 total addresses
As the CIDR number increases, the number of available addresses decreases.
Why Use CIDR Notation?
CIDR notation provides a compact way to describe an IP network. Instead of writing both an IP address and a complete subnet mask, a network can be represented using a single prefix length.
For example:
192.168.10.0/24
is equivalent to:
IP network: 192.168.10.0
Subnet mask: 255.255.255.0
CIDR notation is widely used in modern networking, including routers, firewalls, cloud networks, VPNs, and network configuration.
Use the IP Subnet Calculator above to convert between CIDR prefixes and subnet masks and quickly calculate the complete IPv4 subnet information.
Common IPv4 Subnet Sizes
Different subnet sizes are useful for different network requirements. The CIDR prefix determines how many total IP addresses are available and how many devices can normally be assigned an address.
Here are some of the most commonly used IPv4 subnet sizes:
| CIDR | Subnet Mask | Total IP Addresses | Usable Host Addresses |
|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
Choosing the Right Subnet Size
The appropriate subnet size depends on how many devices need addresses and how the network should be divided.
For example, a small network with fewer than 30 devices could use a /27 subnet, which provides 32 total addresses and normally 30 usable host addresses.
A larger network with up to 254 usable host addresses could use a /24 subnet.
Using smaller subnets can also make it easier to separate different types of devices or users. For example, a business network might use different subnets for employees, servers, printers, security devices, and guest Wi-Fi.
Examples of Common Subnets
/24 subnet
A /24 provides 256 total IPv4 addresses and normally 254 usable host addresses. It is one of the most commonly encountered subnet sizes in private networks.
/25 subnet
A /25 provides 128 total addresses and normally 126 u
IP Subnetting Example
A practical way to understand subnetting is to divide a larger network into several smaller networks.
For example, suppose you have the network:
192.168.10.0/24
This network contains 256 total IPv4 addresses and normally provides 254 usable host addresses.
If the network needs to be divided into four smaller subnets, a /26 prefix can be used.
Dividing a /24 Network into /26 Subnets
A /26 subnet contains 64 total addresses. Four /26 subnets therefore divide the original /24 network into four equal sections.
| Subnet | Network Address | Usable Host Range | Broadcast |
|---|---|---|---|
| 1 | 192.168.10.0/26 | 192.168.10.1 – 192.168.10.62 | 192.168.10.63 |
| 2 | 192.168.10.64/26 | 192.168.10.65 – 192.168.10.126 | 192.168.10.127 |
| 3 | 192.168.10.128/26 | 192.168.10.129 – 192.168.10.190 | 192.168.10.191 |
| 4 | 192.168.10.192/26 | 192.168.10.193 – 192.168.10.254 | 192.168.10.255 |
Each subnet contains:
- 64 total IP addresses
- 62 normally usable host addresses
- One network address
- One broadcast address
Why Divide a Network into Subnets?
Dividing a network into smaller subnets can make network administration easier.
For example, a company could use the four subnets for different purposes:
- 192.168.10.0/26 — Office computers
- 192.168.10.64/26 — Servers
- 192.168.10.128/26 — Printers and network devices
- 192.168.10.192/26 — Guest network
The exact network design depends on the organization’s requirements, but the example demonstrates how subnetting can divide one larger network into several smaller network segments.
How Many Subnets Can You Create?
When a /24 network is divided into /26 networks, the prefix increases by 2 bits.
The number of resulting subnets is:
2² = 4 subnets
Each subnet then has:
2⁶ = 64 total addresses
This gives a total of:
4 × 64 = 256 addresses
The original number of IP addresses is therefore preserved, but the addresses are organized into four separate subnets.
Calculate Your Own Subnet
You can use the IP Subnet Calculator above to perform the same calculations automatically. Enter an IPv4 address and CIDR prefix to find the network address, subnet mask, broadcast address, host range, and number of available addresses.
This is particularly useful when planning a network, checking an existing configuration, or determining whether a subnet is large enough for the required number of devices.
Private IPv4 Address Ranges
Private IP addresses are used for devices and networks that do not need to be directly accessible from the public internet. They are commonly used in home networks, business networks, virtual networks, and cloud environments.
The three IPv4 ranges reserved for private networks are defined by RFC 1918.
| Private IP Range | CIDR | Number of Addresses | Common Use |
|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | /8 | 16,777,216 | Large networks |
| 172.16.0.0 – 172.31.255.255 | /12 | 1,048,576 | Medium-sized networks |
| 192.168.0.0 – 192.168.255.255 | /16 | 65,536 | Home and small networks |
These addresses are not globally routable on the public internet. Instead, routers and other network devices can use NAT (Network Address Translation) to allow devices with private IP addresses to access internet resources through a public IP address.
10.0.0.0/8 Private Network
The 10.0.0.0/8 range is the largest private IPv4 range.
It contains addresses from:
10.0.0.0 to 10.255.255.255
Because it contains more than 16 million addresses, it is commonly used for large corporate networks, data centers, and cloud environments.
172.16.0.0/12 Private Network
The 172.16.0.0/12 range contains addresses from:
172.16.0.0 to 172.31.255.255
This range provides more than one million addresses and can be divided into many smaller subnets.
192.168.0.0/16 Private Network
The 192.168.0.0/16 range is particularly common in home and small-business networks.
It includes addresses from:
192.168.0.0 to 192.168.255.255
Typical examples include:
192.168.0.1
and
192.168.1.1
These addresses are often assigned to routers or other network devices on local networks.
Private IP Addresses and Subnetting
Private IP ranges can be divided into smaller subnets using different subnet masks and CIDR prefixes.
For example:
192.168.1.0/24
can be divided into four /26 subnets:
- 192.168.1.0/26
- 192.168.1.64/26
- 192.168.1.128/26
- 192.168.1.192/26
This allows a single private network to be separated into multiple logical network segments.
Use the IP Subnet Calculator above to calculate the subnet information for private IPv4 networks, including the network address, subnet mask, broadcast address, and usable host range.
Network Address, Host Address, and Broadcast Address
Every IPv4 subnet contains different types of addresses with different purposes. Understanding the network address, host addresses, and broadcast address makes it easier to understand how subnetting works.
For example, consider:
192.168.1.0/26
This subnet contains 64 total IPv4 addresses.
Network Address
The network address identifies the subnet itself. It is the first address in the subnet and cannot normally be assigned to an individual device.
For the example above:
Network address: 192.168.1.0
The network address is used by networking equipment to identify the specific subnet.
Host Addresses
The addresses between the network address and broadcast address are normally available for individual devices.
For 192.168.1.0/26, the usable host range is:
192.168.1.1 – 192.168.1.62
These addresses can normally be assigned to computers, servers, printers, phones, and other network devices.
Broadcast Address
The broadcast address is the final address in an IPv4 subnet.
For the example:
Broadcast address: 192.168.1.63
Broadcast traffic can be used to communicate with all hosts within the local subnet.
Example: 192.168.1.0/26
| Address Type | Address |
|---|---|
| Network Address | 192.168.1.0 |
| First Usable Host | 192.168.1.1 |
| Last Usable Host | 192.168.1.62 |
| Broadcast Address | 192.168.1.63 |
| Total Addresses | 64 |
| Usable Host Addresses | 62 |
The same pattern applies to most traditional IPv4 subnets:
Network address → Usable host addresses → Broadcast address
Why These Addresses Matter
Knowing the network and broadcast addresses is important when configuring routers, firewalls, servers, virtual networks, and other network equipment.
It also helps prevent configuration errors. For example, assigning a network address or broadcast address to a normal host would generally result in an invalid IPv4 configuration.
An IP subnet calculator can determine these values automatically from an IPv4 address and subnet mask or CIDR prefix. This makes it easier to verify network configurations without performing the calculations manually.
Frequently Asked Questions – IP Subnet Calculator
What is an IP subnet?
An IP subnet is a smaller network created by dividing a larger IP network into smaller sections. Subnetting helps organize devices, manage network traffic, improve security, and use IP addresses efficiently.
What is a subnet mask?
A subnet mask determines which part of an IPv4 address represents the network and which part identifies individual devices. For example, the subnet mask 255.255.255.0 corresponds to the CIDR prefix /24.
What does /24 mean in an IP address?
A /24 CIDR prefix means that 24 of the 32 bits in an IPv4 address are used for the network portion. The remaining 8 bits are available for host addresses.
A /24 subnet contains 256 total IPv4 addresses and normally 254 usable host addresses.
How many hosts can a /24 subnet have?
A /24 subnet contains 256 total IPv4 addresses. In a traditional IPv4 network, one address is used for the network address and one for the broadcast address, leaving 254 usable host addresses.
How many hosts can a /26 subnet have?
A /26 subnet contains 64 total IPv4 addresses. After reserving the network and broadcast addresses, there are normally 62 usable host addresses.
What is CIDR notation?
CIDR, or Classless Inter-Domain Routing, is a compact way of describing an IP network. It uses a slash followed by the number of network bits.
For example, 192.168.1.0/24. The /24 is the CIDR prefix and indicates that 24 bits are used for the network portion of the address.
What is the difference between an IP address and a subnet mask?
An IP address identifies a device or network interface, while a subnet mask determines which part of that address belongs to the network and which part identifies the host.
For example:
IP address: 192.168.1.25
Subnet mask: 255.255.255.0
CIDR: /24
Together, these values can be used to determine the network address and usable host range.
How do I calculate a subnet?
To calculate an IPv4 subnet, determine the CIDR prefix or subnet mask and use it to identify the network portion of the IP address. From this information, you can calculate the network address, broadcast address, total number of addresses, and usable host range.
An IP Subnet Calculator can perform these calculations automatically and show the important subnet information from an IP address and CIDR prefix or subnet mask.
Related Calculators and Tools
You may also find these useful:
- Number Converter – Convert numbers between different number systems and formats.
- Math Calculators – Explore a collection of calculators for common mathematical calculations and formulas.
- Number Converter – Change numbers between different systems like binary, decimal, and hexadecimal.
- Percentage Calculator – Calculate percentages, percentage changes, increases, and reductions.
These tools can be useful when working with numbers, conversions, calculations, and other technical problems.