PDF download Download Article
Multiple ways to find the network and broadcast addresses for an IPv4 address
PDF download Download Article

To calculate the network and broadcast address for an IP address, you'll need the IP address, subnet mask, and CIDR notation. With this information, you can use an online networking calculator to calculate the address, or find it manually. There are multiple ways to manually calculate the addresses, including by converting both the IP address and subnet mask to binary values, using classful addressing, and using CIDR for classless networks. This wikiHow teaches you four different ways to calculate your network address and broadcast address from an IP address, along with helpful examples for any scenario.

The Easiest Way to Find a Broadcast Address

To get the network and broadcast addresses without doing math, use a network calculator . Alternatively, you can also calculate the broadcast and network addresses manually by converting it to binary and counting the bits.

Section 1 of 6:

Using a Network Calculator

PDF download Download Article
  1. Go to http://jodies.de/ipcalc in a web browser. This handy calculator takes the pain out of calculating the network address and broadcast address.
  2. In the field that says Address (Host or network), type or paste the IP address . In the "Netmask" field, enter the subnet mask in CIDR format (e.g., /24 for a class C network).
    Advertisement
  3. It is the button below the IP address field. The network address will appear next to "Network," and the broadcast address appears next to "Broadcast."
  4. Advertisement
Section 2 of 6:

Converting to Binary

PDF download Download Article
  1. To calculate the broadcast and network addresses for an IP address, you'll need to first to binary values. The easiest way to do this is to use an online IP to binary calculator, such as this one by Code Beautify. But if you're a networking student or just want to know how to do this by hand, you can check out our guide on converting decimals to binary .
    • For example, if the IP address is 192.168.1.3, the binary address is 111000000.10101000.00000001.00000011.
    • If the subnet mask is 255.255.224.0, which is /19 in CIDR notation, the binary address would be 11111111.11111111.11100000.00000000.
    • We will use the /19 example in this method.
  2. In our example, we're using a /19 network. This means that the first 19 bits of the subnet mask represents the network, and the remaining 13 bits are 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) instead. For a /8 network, you'd count the first 8 bits, etc.
  3. Now we'll want to count the first 19 digits of our converted IP address, just as we did with the subnet mask, because we're working with a /19 network.
    • For the binary IP address 11000000.10101000.00000001.00000011, 11000000.10101000.000 , the first 19 digits, is the network. The remaining 13 digits, 00001.00000011 , represents the host.
  4. Now let's look at the first 19 digits of our converted IP address: 11000000.10101000.000 . To find the network address, we'll simply add a period after the last number, then replace everything that comes after the first 19 bits with the last 13 digits of the converted subnet mask, which, in our example, is 00000.00000000.
    • IP address: 11000000.10101000.000 000001.00000011
    • Subnet mask: 11111111.11111111.111 00000.00000000
    • Network address: The first 19 bits from the IP address with the last 13 bits of the subnet mask: 11000000.10101000.000.00000.00000000
    • Converted: 192.168.0.0
  5. Now, instead of replacing the last 13 bits of our IP address with all zeroes (00000.00000000), we'll convert all of those zeroes to ones to find the broadcast address:
    • IP address: 11000000.10101000.000 00001.00000011
    • Last 13 bits of subnet mask as ones: 11111.11111111
    • Broadcast address: 11000000.10101000.000.11111.11111111
    • Converted: 192.168.0.31
  6. Advertisement
Section 3 of 6:

Using Classful Network

PDF download Download Article
  1. For a classful network total bits is 8. So Total bits = T b = 8. The total bits used for subnetting (n) is determined by the subnet mask.
    • Subnet masks can be 0, 128, 192, 224, 240, 248, 252, 254 and 255.
    • The number of bits used for subnetting (n) to their corresponding subnet mask is as follows: 0=0, 128=1, 192=2, 224=3, 240=4, 248=5, 252=6, 254=7, and 255=8.
    • Subnet mask 255 is default, so it'll not be considered for subnet masking.
    • For example: Let's assume the IP address is 210.1.1.100 and Subnet mask is 255.255.255.224. The total bits= T b = 8. The number of bits used for subnetting for subnet mask 224 is 3.
  2. The equation to determine the number of bits left to host is (m) = T b - n . From the previous step, you got the number of bits used for subnetting (n) and you know the total bits used "T b =8". then you can get the number of bits left for host by subtracting 8-n.
    • Using the example above, n=3. The number of bits left for host is (m) = 8 - 3 = 5. 5 is the number of bits you have left to host.
  3. The number of subnets is 2 n . The number of hosts per subnet = 2 m - 2.
    • In our example, the number of subnets is 2 n = 2 3 = 8. 8 is the total number of subnets.
  4. The value of last bit used for subnet masking is (Δ) = 2 m .
    • In our example, the value of last bit used for subnet masking is Δ = 2 5 = 32. The value of the last bit used is 32.
  5. 5
    Calculate the number of hosts per subnet. The number of hosts per subnet is represented by the formula 2 m - 2 .
  6. Now you can find previously calculated number of subnets by separating subnets each having value of last bit used for subnet masking or Δ. In our example, Δ=32. So we can separate IP addresses in increments of 32.
    • The 8 subnets (as calculated in previous step) are shown above.
    • Each of them has 32 addresses.
  7. The lowest address in a subnet is the network address. The highest address in a subnet is the broadcast address.
  8. The lowest address of the subnet your IP address falls in is the network address. The highest address in the subnet your IP address falls in is the broadcast address.
      Our example IP address 210.1.1.100 falls in the 210.1.1.96 - 210.1.1.127 subnet (see the previous step table). So 210.1.1.96 is network address and 210.1.1.127 is broadcast address.
  9. Advertisement
Section 4 of 6:

Using CIDR

PDF download Download Article
  1. In CIDR, you have a IP address followed by bit-length prefix separated by slash(/). Now you can start to convert bit-length prefix to quad-dotted by separating the bit-length prefix in increments of 8 and adding the final bit number.
    • Example: If the bit-length prefix is 27, then write it as 8 + 8 + 8 + 3 .
    • Example: If bit-length prefix is 12, then write it as 8 + 4 + 0 + 0 .
    • Example: Default bit-length prefix is 32, then write it as 8 + 8 + 8 + 8.
  2. Convert the corresponding bit according to the above table and represent in quad-dotted decimal format. For example, bit-length 27 is represented by 8+8+8+3. This converts to 225.225.225.224.
    • Using another example, the IP address is 170.1.0.0/26 . Using above table, you can write the bit-length prefix 26 as 8+8+8+2. Using the chart above, this converts to 225.225.225.192. Now the IP address is 170.1.0.0 and subnet mask in quad-dotted decimal format is 255.255.255.192 .
  3. 3
    Determine the total number of bits. The total number of bits is represented using the following equation: T b = 8 .
  4. Subnet masks can be 0, 128, 192, 224, 240, 248, 252, 254 and 255. The table above gives you the Number of bits used for subnetting (n) to their corresponding subnet mask.
    • For subnet mask 255 is default, so it'll not consider for subnet masking.
    • From the previous step, you got IP address = 170.1.0.0 and Sub-net mask = 255.255.255.192
    • Total bits = T b = 8
    • Number of bits used for subnetting = n. As the subnet mask = 192, its corresponding number of bits used for Subnetting is 2 from above table.
  5. From the previous step, you got the number of bits used for subnetting (n) and you know the total bits (T b ) = 8. Then you can get number of bits left for host is (m) = T b - n or T b = m+n .
    • In our example, the number of bits used for subnetting (n) is 2. So the number of bits left for host is m = 8 - 2 = 6. The total bits left for the host is 6.
  6. 6
    Calculate the number of subnets. The Number of subnets is 2 n .
    • In our example, the number of subnets = 2 2 = 4. The total number of subnets is 4.
  7. This is represented with the formula (Δ) = 2 m .
    • In our example, the value of last bit used for subnet masking = Δ = 2 6 = 64. The value of the last bit used for subnet masking is 64.
  8. The number of hosts per subnet is 2 m - 2.
  9. Now you can find previously calculated number of subnets by separating subnets each having the value of last bit used for subnet masking or Δ.
    • In our example, the last value used for subnet masking is 64. This produces 4 subnets with 64 addresses.
  10. Our example IP is 170.1.0.0. This falls in the 170.1.0.0 - 170.1.0.63 subnet.
  11. The first address in a subnet is the network address and the last number is the broadcast address.
    • Our example IP address is 170.1.0.0. So 170.1.0.0 is network address and 170.1.0.63 is broadcast address.
    • See CIDR Examples for more examples.
  12. Advertisement
Section 5 of 6:

Classful Network Examples

PDF download Download Article
  1. 1
    IP address = 100.5.150.34 and subnet mask = 255.255.240.0 Total bits = T b = 8
    Subnet Mask 0 128 192 224 240 248 252 254 255
    No. of bits used for Subnetting (n) 0 1 2 3 4 5 6 7 8

  2. 2
    Number of bits used for subnetting for subnet mask 240 = n 1 = 4
    (as subnet mask = 240 and its corresponding "No.
    of bits used for Subnetting" is 4 from above table) Number of bits used for subnetting for subnet mask 0 = n 2 = 0
    (as subnet mask = 0 and its corresponding "No. of bits used for Subnetting" is 0 from above table) Number of bits left for host for subnet mask 240 = m 1 = T b - n 1 = 8 - 4 = 4 Number of bits left for host for subnet mask 0 = m 2 = T b - n 2 = 8 - 0 = 8 Number of subnets for subnet mask 240 = 2 n 1 = 2 4 = 16 Number of subnets for subnet mask 0 = 2 n 2 = 2 0 = 1 Value of last bit used for subnet masking for subnet mask 240 = Δ 1 = 2 m 1 = 2 4 = 16 Value of last bit used for subnet masking for subnet mask 0 = Δ 2 = 2 m 2 = 2 8 = 256 For subnet mask 240, addresses will be separated by 16 and for subnet mask 0, it'll be 256. Using Δ 1 and Δ 2 value, the 16 subnets are given below
    100.5.0.0 - 100.5.15.255 100.5.16.0 - 100.5.31.255 100.5.32.0 - 100.5.47.255 100.5.48.0 - 100.5.63.255
    100.5.64.0 - 100.5.79.255 100.5.80.0 - 100.5.95.255 100.5.96.0 - 100.5.111.255 100.5.112.0 - 100.5.127.255
    100.5.128.0 - 100.5.143.255 100.5.144.0 - 100.5.159.255 100.5.160.0 - 100.5.175.255 100.5.176.0 - 100.5.191.255
    100.5.192.0 - 100.5.207.255 100.5.208.0 - 100.5.223.255 100.5.224.0 - 100.5.239.255 100.5.240.0 - 100.5.255.255

  3. 3
    IP address 100.5.150.34 comes in 100.5.144.0 - 100.5.159.255. Hence, 100.5.144.0 is the network address and 100.5.159.255 is the broadcast address.
  4. 4
    See Classful Network Examples for more examples.
  5. Advertisement
Section 6 of 6:

CIDR Examples

PDF download Download Article
  1. 1
    IP address in CIDR is 200.222.5.100/9
    9 = 8 + 1 + * + 0
    255 . 128 . 0 . 0

    IP address = 200.222.5.100 and subnet mask = 255.128.0.0 Total bits = T b = 8

    Subnet Mask 0 128 192 224 240 248 252 254 255
    No. of bits used for Subnetting (n) 0 1 2 3 4 5 6 7 8

    Number of bits used for subnetting for subnet mask 128 = n 1 = 1
    (as subnet mask = 128 and its corresponding "No. of bits used for Subnetting" is 1 from above table)

    Number of bits used for subnetting for subnet mask 0 = n 2 = n 3 = 0
    (as subnet mask = 0 and its corresponding "No. of bits used for Subnetting" is 0 from above table)

  2. 2
    Number of bits left for host for subnet mask 128 = m 1 = T b - n 1 = 8 - 1 = 7 Number of bits left for host for subnet mask 0 = m 2 = m 3 = T b - n 2 = T b - n 3 = 8 - 0 = 8 Number of subnets for subnet mask 128 = 2 n 1 = 2 1 = 2 Number of subnets for subnet mask 0 = 2 n 2 = 2 n 3 = 2 = 1 Value of last bit used for subnet masking for subnet mask 128 = Δ 1 = 2 m 1 = 2 7 = 128 Number of host per subnet = 2 m 1 - 2 = 2 7 - 2 = 126 Value of last bit used for subnet masking for subnet mask 0 = Δ 2 = Δ 3 = 2 m 2 = 2 m 3 = 2 8 = 256 Number of host per subnet for subnet mask 0 = 2 m 2 - 2 = 2 m 3 - 2 = 2 8 - 2 = 254

  3. 3
    For subnet mask 128, addresses will be separated by 128 and for subnet mask 0, it'll be 256. Using Δ 1 , Δ 2 and Δ 3 value, the 2 subnets are given below
    200.0.0.0 - 200.127.255.255
    200.128.0.0 - 200.255.255.255

  4. 4
    IP address 200.222.5.100 comes in 200.128.0.0 - 200.255.255.255. Hence, 200.128.0.0 is the network address, and 200.255.255.255 is the broadcast address.
  5. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I find the last address host?
    Community Answer
    Broadcast address -1. BC - 1 in this way you can find out the last host address.
  • Question
    How can I find the network for an IP address?
    Community Answer
    After you borrow bits find out your block size, it will be the first address of each block. For example, if the block size is 32, 192.1.4.0 is your network IP. 192.1.4.31 is your broadcast.
  • Question
    How do I find IP addresses?
    Tim Newman
    Community Answer
    If you're looking for a public IP address, Googling "ip" should be sufficient to receive an answer. If you're looking for your private IP address (stored on the router), open CMD (windows button + R and type in cmd), and type "ipconfig".
See more answers
Ask a Question
      Advertisement

      Tips

      • In CIDR, just after you convert the bit-length prefix to quad-dotted decimal format, you can follow the same procedure as for Classful network.
      • This method is only for IPv4, not applicable for IPv6.

      Tips from our Readers

      The advice in this section is based on the lived experiences of wikiHow readers like you. If you have a helpful tip you’d like to share on wikiHow, please submit it in the field below.
      • I suggest this new, comprehensive calculator that encompasses a wide range of services: https://www.one-calculator.com/online-ip-subnet-calculator.html
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Article Summary X

      1. Assume the total number of bits used for subnetting is Tb = 8.
      2. Find how many bits used for subnetting (n) according to the following subnet masks:0=0, 128=1, 192=2, 224=3, 240=4, 248=5, 252=6, 254=7, and 255=8
      3. Use the formula (m) = Tb - n to determine the number of bits left to host.
      4. Use the formula 2m - 2 to calculate the number of subnets.
      5. Use the formula Δ = 2m to calculate the value of the last bit used for subnet masking.
      6. Separate subnets using the value fo teh last bit used for subnet masking.
      7. Determine which subnet your IP address fall in.
      8. Use the first address in the subnet to determine the network address. 9. Use the last address in the subnet to determine the broadcast address.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 824,676 times.

      Reader Success Stories

      • Anonymous

        Jul 26, 2016

        "The only subnetting methodology that I have seen which explains simply how to calculate network and broadcast ..." more
      Share your story

      Is this article up to date?

      Advertisement