Numerous Techniques to Determine the Network and Broadcast Addresses for an IPv4 Address
Important Information
- To effortlessly obtain the network and broadcast addresses, utilize a network calculator.
- The simplest method to manually compute the broadcast and network addresses is by converting to binary and tallying the bits.
- Employ the CIDR method for subnetting your network in a classless environment.
Procedures
Utilizing a Network Calculator

Visit http://jodies.de/ipcalc on your web browser. This convenient tool simplifies the process of determining the network and broadcast addresses.

Input the IP address and subnet mask. Enter the IP address in the 'Address (Host or network)' field and the subnet mask in CIDR format (e.g., /24 for a class C network) in the 'Netmask' field.

Press Calculate. Click on the button labeled 'Calculate' located below the IP address field. The network address will be displayed next to 'Network,' and the broadcast address will appear next to 'Broadcast.'
Conversion to Binary

Converting the IP Address and Subnet Mask to Binary. To determine the broadcast and network addresses for an IP address, start by converting them to binary values. You can use an online IP to binary calculator like this one provided by Code Beautify. However, if you prefer manual methods, especially if you're a networking student or just curious, you can refer to our guide on decimal to binary conversion.
- For instance, if the IP address is 192.168.1.3, its binary form is 111000000.10101000.00000001.00000011.
- The subnet mask, such as 255.255.224.0 (equivalent to /19 in CIDR), translates to 11111111.11111111.11100000.00000000 in binary form.
- We'll utilize the /19 example throughout this explanation.

Counting the Bits in the Subnet Mask. In our scenario, we're dealing with a /19 network, where the first 19 bits of the subnet mask define the network, and the remaining 13 bits represent the host.
- 11111111.11111111.111 (network) 00000.00000000 (host)
- If you were working with a /24 network, you'd count the first 24 bits (digits). For a /8 network, you'd count the initial 8 bits, and so on.

Counting the Bits in the IP Address. We'll also count the first 19 digits of our converted IP address because we're dealing with a /19 network.
- For the binary IP address 11000000.10101000.00000001.00000011, the first 19 digits, 11000000.10101000.000, represent the network, while the remaining 13 digits, 00001.00000011, denote the host.

Determining the Network Address. Focusing on the first 19 digits of our converted IP address, 11000000.10101000.000, we'll append a period after the last number and replace everything beyond the first 19 bits with the last 13 digits of the converted subnet mask, which in our case is 00000.00000000.
- IP address: 11000000.10101000.000000001.00000011
- Subnet mask: 11111111.11111111.11100000.00000000
- Network address: Combine the first 19 bits from the IP address with the last 13 bits of the subnet mask: 11000000.10101000.000.00000.00000000
-
Converted:

Determining the Broadcast Address. Instead of replacing the last 13 bits of our IP address with all zeroes (00000.00000000), we'll change those zeroes to ones to determine the broadcast address:
- IP address: 11000000.10101000.00000001.00000011
- Last 13 bits of subnet mask as ones: 11111.11111111
- Broadcast address: 11000000.10101000.000.11111.11111111
- Converted: 192.168.0.31
Using Classful Network

Determining the Total Number of Bits for Subnetting. In a classful network, the total bits used for subnetting is 8 (Tb = 8). The number of bits used for subnetting (n) is based on the subnet mask.
- Subnet masks range from 0 to 255, with corresponding values for the number of bits used for subnetting: 0=0, 128=1, 192=2, 224=3, 240=4, 248=5, 252=6, 254=7, and 255=8.
- For instance, if the subnet mask is 255.255.255.224, then Tb = 8 and n = 3.

Determining the Number of Bits Remaining for Hosts. The equation to find the number of bits remaining for hosts is (m) = Tb - n. For example, if n = 3, then m = 8 - 3 = 5. So, you have 5 bits left for hosts.
- In our example, n=3, so m = 8 - 3 = 5. You're left with 5 bits for hosts.

Calculating the Number of Subnets. The formula for the number of subnets is 2n. For instance, if n = 3, then there are 23 = 8 subnets.
- In our example, with n = 3, there are 8 subnets.

Calculating the Value of the Last Bit Used for Subnet Masking. The value of the last bit used for subnet masking is given by (Δ) = 2m. For example, if m = 5, then Δ = 25 = 32.
- In our example, with m = 5, the value of the last bit used for subnet masking is 32.
Calculate the Number of Hosts per Subnet. You can determine the number of hosts per subnet using the formula 2m - 2.

Segment Subnets Based on Subnet Masking's Last Bit Value. Separate subnets by the value of the last bit used for subnet masking (Δ). In our case, Δ=32, so IP addresses are segmented in increments of 32.
- The 8 calculated subnets are displayed above.
- Each subnet accommodates 32 addresses.

Find Network and Broadcast Addresses for IP Addresses. The network address is the lowest address in a subnet, and the broadcast address is the highest.

Find the Broadcast Address for Your IP Address. Determine the network and broadcast addresses by identifying the subnet your IP address falls into.
- For example, if your IP address is 210.1.1.100, it falls into the subnet 210.1.1.96 - 210.1.1.127 (refer to the previous step's table). Thus, the network address is 210.1.1.96 and the broadcast address is 210.1.1.127.
Using CIDR

Express the Bit-Length Prefix in Binary Format. In CIDR notation, an IP address is followed by a bit-length prefix separated by a slash (/). You can convert the bit-length prefix to quad-dotted decimal format by grouping bits in increments of 8.
- For instance, if the bit-length prefix is 27, represent it as 8 + 8 + 8 + 3.
- If the bit-length prefix is 12, represent it as 8 + 4 + 0 + 0.
- Default bit-length prefix 32 is represented as 8 + 8 + 8 + 8.

Transform the Bit-Length Prefix into Quad-Dotted Decimal Format. Convert the bit-length prefix into quad-dotted decimal format by following the conversion chart. For example, the bit-length 27 corresponds to 8+8+8+3, which converts to 225.225.225.224.
- Another example: IP address 170.1.0.0/26. The bit-length prefix 26 translates to 8+8+8+2, resulting in 225.225.225.192 for the subnet mask. Now, the IP address is 170.1.0.0 with a subnet mask of 255.255.255.192.
Determine the Total Number of Bits. The total number of bits is denoted by the equation Tb = 8.

Calculate the Number of Bits Used for Subnetting. Subnet masks range from 0, 128, 192, 224, 240, 248, 252, 254, to 255. Refer to the table for the corresponding number of bits used for subnetting (n).
- The default subnet mask 255 is not considered for subnet masking.
- Given the IP address = 170.1.0.0 and Subnet mask = 255.255.255.192 from the previous step:
- Total bits = Tb = 8
- Number of bits used for subnetting = n. Since the subnet mask is 192, the corresponding number of bits used for subnetting is 2 according to the table.

Determine the Number of Bits Remaining for Hosts. Using the information from the previous step, where n = 2 and Tb = 8, calculate the remaining bits for hosts as m = Tb - n or Tb = m + n.
- In our example, n = 2, so m = 8 - 2 = 6. Therefore, there are 6 bits left for hosts.
Determine the Total Number of Subnets. The number of subnets is calculated using the formula 2n.
- In our scenario, the number of subnets = 22 = 4. So, the total number of subnets is 4.

Calculate the Value of the Last Bit Used for Subnet Masking. The formula used to calculate this value is (Δ) = 2m.
- In our case, the value of the last bit used for subnet masking = Δ = 26 = 64. Hence, the value of the last bit used for subnet masking is 64.

Determine the Number of Hosts per Subnet. The number of hosts per subnet is calculated using the formula 2m - 2.

Segment Subnets Based on the Value of the Last Bit Used for Subnet Masking. By utilizing the previously calculated value of the last bit used for subnet masking or Δ, you can separate subnets accordingly.
- In our example, with a last bit value of 64, we have 4 subnets, each accommodating 64 addresses.

Determine the Subnet Containing Your IP Address. Our IP address example is 170.1.0.0. This falls within the subnet range of 170.1.0.0 - 170.1.0.63.

Find Your Broadcast Address. The last address in a subnet is the broadcast address.
- For our example IP address 170.1.0.0, the network address is 170.1.0.0 and the broadcast address is 170.1.0.63.
- Refer to CIDR Examples for additional examples.
Examples of Classful Networks
Examples of CIDR
Useful Tips
-
In CIDR, after converting the bit-length prefix to quad-dotted decimal format, you can apply the same procedure as for Classful networks.
-
This method is specific to IPv4 and not applicable to IPv6.