You don't have javascript enabled. Please enable javascript to use this website.
IPv4 Subnet Calculator

IPv4 Subnet Calculator

See IP Address information of an IPv4 subnet range (CIDR)

Explore More Useful Calculators:


What is an IP Subnet Calculator ? What can it be used for ?

An IP subnet calculator is a tool used to perform various calculations related to subnetting and IP addresses. It is a helpful tool for network administrators and engineers who are responsible for managing and maintaining network configurations.

An IP subnet calculator can be used for several purposes, including:

  1. Subnetting: To divide a large network into smaller, more manageable subnets and determine the subnet mask, network address, broadcast address, and host range for each subnet.

  2. Network planning: To determine the number of hosts that can be accommodated in a network, ensure that there are enough IP addresses available for all devices, and avoid IP address conflicts.

  3. IP address management: To efficiently allocate IP addresses to devices within a network and avoid IP address conflicts.

  4. IP address migration: To plan and execute the migration of devices from one network to another without disrupting network services.

  5. Troubleshooting: To identify potential network issues and resolve IP address conflicts.

By using an IP subnet calculator, network administrators and engineers can save time and ensure that network configurations are managed efficiently and effectively.


What is Subnetting ?

Subnetting is a process of dividing a large network into smaller, more manageable sub-networks, also known as subnets. Each subnet is considered a separate network and has its own network address and subnet mask.

Subnetting helps to divide a large network into smaller segments, which can improve network security, reduce network congestion, and allow for more efficient use of IP addresses. It also allows network administrators to customize the size of each subnet to meet the specific needs of their organization.

To create subnets, the network administrator must first determine the size of the subnets required and then use the subnet mask to divide the original network into the desired number of subnets. The subnet mask defines which part of the IP address is used for the network address and which part is used for the host address within the subnet.


What is an IP Subnet ?

An IP subnet is a division of a larger network into smaller sub-networks. It allows for the creation of multiple, smaller networks within a larger network and facilitates the allocation of IP addresses to devices in these smaller networks. The purpose of subnetting is to enhance network security, alleviate network congestion, and make network management easier.s


What is a Subnet Mask ?

A subnet mask is a 32-bit number used in conjunction with an IP address to identify the network address and the host address within a network.

A subnet mask defines which part of an IP address is used for the network address and which part is used for the host address. The network address is used to identify the network and the host address is used to identify a specific device within the network.

The subnet mask is expressed in dot-decimal notation, with each octet separated by a period. For example, the subnet mask 255.255.255.0. The number of bits used for the network address is determined by the subnet mask, and the number of bits used for the host address is determined by subtracting the number of network address bits from 32.

The subnet mask is used to create subnets within a network, and it is a critical component of IP networking and subnetting. By using subnet masks, network administrators can divide large networks into smaller, more manageable sub-networks and improve network security, reduce network congestion, and allow for more efficient use of IP addresses.


What is a CIDR notation ?

CIDR stands for Classless Inter-Domain Routing. It is a method of allocating IP addresses and routing Internet Protocol (IP) packets.

In traditional IP addressing, IP addresses were divided into classes (A, B, and C) based on the size of the network. Each class had a fixed number of bits for the network address and a fixed number of bits for the host address. This was inflexible and resulted in a waste of IP addresses.

CIDR was introduced to overcome this limitation and provide a more flexible and efficient way of allocating IP addresses. In CIDR, the number of bits used for the network address is specified by a suffix "/x", where x is a number between 0 and 32. This allows for more efficient use of IP addresses and enables the creation of variable-length subnets.

CIDR is widely used in network administration and is the standard for IP address allocation on the Internet. It eliminates the traditional IP address classes and provides a single, universal method for allocating IP addresses and routing IP packets.


What are the differences between Subnet Mask and CIDR ?

Here is a table that includes more features and details comparing subnet masks and CIDR:

Feature Subnet Mask CIDR
Definition A 32-bit number used in conjunction with an IP address to identify the network address and the host address within a network. It separates the IP address into two parts: the network address and the host address. A method of allocating IP addresses and routing IP packets that allows for more flexibility and efficient use of IP addresses. It divides an IP address into two parts: the network address and the host address.
Notation Expressed in dot-decimal notation (e.g. 255.255.255.0) where each octet represents 8 bits. Expressed using a suffix "/x" where x is a number between 0 and 32 (e.g. 192.168.1.0/24). The "/x" indicates the number of bits used for the network address.
Purpose The purpose of the subnet mask is to identify the network address and the host address within a network, which is essential for routing IP packets between different networks. The purpose of CIDR is to allocate IP addresses and route IP packets in a more flexible and efficient manner, allowing for a more efficient use of IP addresses and reducing the size of routing tables.
Use The subnet mask is used in combination with the IP address to identify the network address and the host address within a network, which is required for routing IP packets between different networks. CIDR is used to allocate IP addresses and route IP packets, allowing for a more flexible and efficient use of IP addresses and reducing the size of routing tables.
Advantages The subnet mask is a simple and well-established method for identifying the network address and the host address within a network. It is widely supported and easy to understand. CIDR offers several advantages over the traditional IP address classes and subnet masks, including more flexible and efficient allocation of IP addresses, reduced size of routing tables, and the ability to aggregate multiple IP networks into a single entry in the routing table.
Limitations The subnet mask has some limitations when it comes to efficiently allocating IP addresses. The traditional IP address classes and subnet masks are not very flexible and can lead to a waste of IP addresses. CIDR requires a certain level of technical expertise to understand and implement, and may not be suitable for all

How to convert a Subnet Mask to CIDR ?

To convert a subnet mask to CIDR (Classless Inter-Domain Routing) notation, follow these steps:

  1. Convert the subnet mask to binary: Write down the subnet mask in dotted decimal notation (e.g. 255.255.255.0), and convert each octet to binary.

  2. Count the number of contiguous 1's in the binary representation of the subnet mask: The number of contiguous 1's in the binary representation of the subnet mask represents the size of the network prefix.

  3. Express the network prefix size in CIDR notation: The network prefix size is represented in CIDR notation by adding a "/" followed by the number of bits in the prefix to the IP address (e.g. 192.168.0.0/24).

Example: For a subnet mask of 255.255.255.0, the binary representation is 11111111.11111111.11111111.00000000. The number of contiguous 1's is 24, so the subnet mask can be expressed as a CIDR notation of /24.


How to convert a CIDR to Subnet Mask ?

To convert a CIDR (Classless Inter-Domain Routing) notation to a subnet mask, follow these steps:

  1. Identify the network prefix size: The network prefix size is represented by the number after the "/" in the CIDR notation (e.g. /24).

  2. Convert the prefix size to binary: Write down enough binary digits to represent the prefix size, and fill the remaining digits with zeros.

  3. Convert the binary to dotted decimal notation: Divide the binary representation of the prefix size into four octets and convert each octet to decimal.

  4. Express the subnet mask in dotted decimal notation: Write down the decimal representation of each octet, separated by periods (e.g. 255.255.255.0).

Example: For a CIDR notation of /24, the prefix size is 24, so the binary representation is 11111111.11111111.11111111.00000000. Converting each octet to decimal gives 255.255.255.0 as the subnet mask.


What is an IP range ? How is it related to a Subnet Mask and CIDR ?

An IP range refers to a set of contiguous IP addresses within a larger network. It defines the scope of the network and helps to categorize devices within the network by allocating specific IP addresses to each device.

The IP range is related to both the subnet mask and CIDR (Classless Inter-Domain Routing) notation, as both subnet masks and CIDR notation are used to define the size and structure of IP networks and to determine the range of IP addresses within those networks.

A subnet mask is used to divide a larger network into smaller sub-networks, and CIDR notation is used to express the size of the network prefix. Both the subnet mask and CIDR notation are used to determine the IP range of a network. For example, a subnet mask of 255.255.255.0 with a CIDR notation of /24 would represent a network with 256 total IP addresses, ranging from x.x.x.0 to x.x.x.255.


How to calculate IP range from a Subnet Mask ?

To calculate the IP range from a subnet mask, follow these steps:

  1. Convert the subnet mask to binary: Write down the subnet mask in dotted decimal notation (e.g. 255.255.255.0), and convert each octet to binary.

  2. Identify the network address and broadcast address: The network address is the first IP address in the range and is obtained by setting the host bits of the IP address to 0. The broadcast address is the last IP address in the range and is obtained by setting the host bits of the IP address to 1.

  3. Convert the network address and broadcast address back to dotted decimal notation: The network address and broadcast address are expressed in dotted decimal notation by converting the binary representation of each octet back to decimal.

Example: For a subnet mask of 255.255.255.0 and an IP address of 192.168.1.10, the binary representation of the subnet mask is 11111111.11111111.11111111.00000000. The network address is obtained by setting the host bits of the IP address (192.168.1.10) to 0, which results in 192.168.1.0. The broadcast address is obtained by setting the host bits of the IP address to 1, which results in 192.168.1.255. So, the IP range for this subnet mask is 192.168.1.0 to 192.168.1.255.


How to calculate a Subnet Mask for an IP range ?

To calculate a subnet mask for an IP range, follow these steps:

  1. Determine the number of sub-networks needed: This will determine the size of the subnet mask, as the subnet mask determines the size of each sub-network.

  2. Calculate the network prefix size: The network prefix size is represented by the number of bits used for the network portion of the IP address, and it determines the size of the sub-network.

  3. Convert the network prefix size to binary: Write down enough binary digits to represent the network prefix size and fill the remaining digits with zeros.

  4. Convert the binary to dotted decimal notation: Divide the binary representation of the network prefix size into four octets and convert each octet to decimal.

  5. Express the subnet mask in dotted decimal notation: Write down the decimal representation of each octet, separated by periods (e.g. 255.255.255.0).

Example: To create 4 sub-networks, each with a size of 8 IP addresses, the network prefix size would be /29. The binary representation of this network prefix size is 11111000. The decimal representation is 255.255.255.248, which is the subnet mask.


How Subnet Masks, CIDR and IP Ranges differe between IPv4 and IPV6 ?

Here is a comparison of subnet masks, CIDR notation, and IP ranges between IPv4 and IPv6:

Feature IPv4 IPv6
Subnet Mask Dotted decimal format Not used, replaced by CIDR
CIDR Notation /xx (where xx is between 0 and 32) /xx (where xx is between 0 and 128)
IP Range Dotted decimal format Dotted decimal format

In IPv4, subnet masks are used to divide a network into smaller sub-networks and to determine the range of IP addresses within a network. The subnet mask is expressed in dotted decimal format (e.g. 255.255.255.0).

In IPv6, subnet masks are not used, and CIDR notation is used instead to determine the size of the network prefix. CIDR notation in IPv6 uses the same format as IPv4, but the range of possible values is larger (0 to 128).

In both IPv4 and IPv6, IP ranges are expressed in dotted decimal format, although the size of the IP range is different between the two. IPv4 has a limited number of IP addresses (approx. 4 billion), while IPv6 has a much larger number of IP addresses (approx. 340 trillion, trillion, trillion).