How To Calculate Subnets And Hosts Per Subnet
Calculate the Valid host Range. Then, for each, calculate: The number of subnets that exist; The number of usable host IP addresses per subnet. 6 bits identify the host. How to Calculate Subnets Subnets and Hosts Borrow 2 bits S S H H H H H H # of subnets = 2 2 = 4 Subnet mask = 2 bits = 128 + 64 = 192 Range of hosts = 2 6 = 64 TT Range Useable Range Network ID 0 – 63 64 – 127 65 - 126 128 – 191 129 - 190 Broadcast 192 – 255 Address Borrow 3 bits S S S H H H H H # of subnets = 2 3 = 8. The default format for a Class B IPv4 address is Network. What subnet Answer: Because. Multiplying the number of subnets by the number of nodes available per subnet gives you the total number of nodes available for your class and subnet mask. CIDR (Classless InterDomain Routing) notation: Subnet mask is also represented as below:. Adding ones to the subnet mask means you get fewer hosts per network subnet but more network subnets. How many subnets and hosts-per-subnet you can create with a subnet mask of 255. IPv4 Netmask and Subnet Mask Table. You should plan ahead and choose the best subnet mask the first time. Subnetting applies to IP addresses because this is done by borrowing bits from the host portion of the IP address. The Advanced Subnet Calculator from SolarWinds is the industry leader and FREE. 0 and a mask of 255. 0 and the new custom subnet mask is 255. This guide helps you understand how to calculate a subnet mask, including understanding how a subnet mask works, stepping you through the calculation itself, giving you handy tricks for subnetting and IP addressing, and pointing you to a subnet calculator you can use. I need to determine the new subnet mask showing it in dotted decimal and as a binary field, calculate the actual numbers of subnets and host in each subnet, determine if the company can subnet as desired. With 1 bit, we are going to be able to represent 2 to the first power as a number of subnets that is 2 subnets. There are also many online subnet calculators available like this one. There's one more issue that needs to be explained regarding the split into subnet ID and host ID. This process can be repeated multiple times to create subnets of various sizes based on the number of hosts required in each subnet. List subnets to determine the names and regions of existing subnets in your project. 0/24 network based on the maximum number of hosts required by the largest subnet. The first and last host address for each subnet. Enter IP address value either in dot-decimal notation (e. 2; x y; 8 – 2; Calculating Hosts in Subnets. Next, determine the number of subnet bits required. 1 are: CIDR block. 224 (/27) allows you to have eight subnets, each with 32 IP addresses (30 of which could be assigned to devices). To configure this setting, connect the correct type of serial cable (either modem or null modem) from a com port on your PC to the serial port on the CoBos product. Enter your IP address and play with the second netmask until the result matches your need. We focus on the last octet which contains all the information we are after. Subnetting, therefore, involves dividing the network into smaller portions called subnets. I think that’s more than enough. Finally, you need to determine the first host, last host, and broadcast address for each subnet. Host bits = 4bits. 512 subnets and 126 hosts. Rather the concern is how many subnets fit within a certain network. IP Calculator. This is the reason why network engineers required to calculate the number of subnets obtained by borrowing three bits would calculate 2 3-2 (6) and not 2 3 (8). Subnetting Questions with Answers How many subnets and hosts per subnet can you get from the network 192. The first subnet is done for you. You need to calculate this based on the powers of 2. There is no specific use case, just a server in a sensitive area of research and development, which has to be secured. Let’s say that we need to subnet a class C address 192. If they're all 1, it's the broadcast address for that subnet. Calculating the Hosts for subnets. The following diagram illustrated the calculation steps. This means that a 31-bit netmask is essentially useless since it leaves only two addresses per net: one for the network number, and the other for the broadcast address. Choose a mask that will maximize the number of hosts per subnet. Finding Multiple Possible Masks. If you wanted 5 different masks using VLSM I would need to know how many hosts per subnet so that I could find the appropriate mask for each. The subnet mask in binary. There is also a callout pointing to the 6 remaining host bits showing that there are 62 valid hosts on each of these subnets (2^6-2 = 62 hosts per subnet). Your job is to plan a network. I just need to know how to figure out the mask when given a number of hosts. I understand how a subnet mask works, how to find the ranges, etc. Which subnet mask will accommodate the number of IP addresses required for ASW-1? 255. CIDR (Classless Inter-Domain Routing, sometimes known as supernetting) is a way to allocate and specify the Internet addresses. This subnet calculator can help you with the following tasks: Identify subnet parameters for a given IP address and subnet mask (or CIDR prefix). Question: How many subnets and host per subnet can you get from the network 172. In the example above, since there are 4 subnets, the number of subnet bits is two. How many hosts per subnet do we need? 2 y – 2 = number of hosts per subnet. To calculate how many hosts I went to the first octet owned by the host in the subnet part of the address which is “224” and converted it to binary which is “11100000” 224 = 11100000 I then calculated how many 0s there were in the binary address which is 5. To calculate how many usable subnets are obtained when borrowing a specific number of bits, use the formula above: 2 N - 2 = number of subnets (where N is the number of bits borrowed). Problem – How to calculate IP address subnet information (Network, Broadcast, First IP, Last IP)? It’s too simple equation to calculate IPv4 Subnet Network ID. The host address of all zeros, in combination with the network address, are also used to specify the complete subnet address (RFC 1105). That is how many IPs a subnet has, not how many usable hosts a subnet has. How to determine the number of subnets and the number of hosts per subnet Two formulas can provide this basic information: Number of subnets = 2 s (Second subnet formula: Number of subnets = 2 s - 2) Number of hosts per subnet = 2 h - 2 Both formulas calculate the number of hosts or subnets based on the number of binary bits used. "How to Calculate. 2 6 – 2 = 64 -2 = 62 hosts per subnet. It wants to have 5 subnets with a max of 25 computers on each subnet. Step 3: Subnet 10. First Of All, Keep this Subnet Hosts Map in mind (Number of Hosts per Prefix):. Every subnet must have a network address and a broadcast address, and neither of those can ever be used by a host. How many hosts per subnet do we need? 2 y – 2 = number of hosts per subnet. Simply input a starting IP address, and your choice of subnet bits or the maximum number of desired subnets or the host bits or the maximum number of desired hosts, and the calculator figures out the all the rest, including a list of subnets. Also you can calculate the subnet address, broadcast address, and convert certain IP address into hexadecimal and binary code. This technique is more commonly used when you have to inter-connect networks between two routers. 41, with the capability to deaggregate network ranges. The tool calculates optimal number of host addresses per subnet that meets the subnet requirement, for example both subnets ‘net A’ and ‘net D’ were allocated 14 hosts, which meet or exceed the number of host addresses required in ‘net A’ and ‘net D’. Enter IP address value either in dot-decimal notation (e. This process can be repeated multiple times to create subnets of various sizes based on the number of hosts required in each subnet. The result will be the network address. Finally, you need to determine the first host, last host, and broadcast address for each subnet. Answer Total subnets = 4096 Total hosts (per subnet) = 14. System Engineer 77,514 views. To calculate the number of possible hosts per subnet, use the formula. IPv4 Netmask and Subnet Mask Table. Your job is to plan a network. In this question, 7 subnets are needed. On the otherhand, we will be loosing the number of hosts available within a subnet to 2 4 or 16 hosts per subnet. Given below is a list of all possible combination of Class A subnets:. Subnets range from:. For example, to calculate the network address when a subnet address of 255. The subnet mask in decimal. You can use the subnet mask calculation formula. Determine How Many Bits to Borrow Because our requirement specifies 30 host addresses per subnet, we need to first determine the minimum number of host bits to leave. Subnet mask calculator With subnet mask you can split your network into subnets. This tip, reposted from SearchNetworking. Every subnet must have a network address and a broadcast address, and neither of those can ever be used by a host. So the usable hosts is actually 2 y-2 where y is the amount of host bits. Our subnetting calculator is a great tool for those trying to learn how to subnet. The tool calculates optimal number of host addresses per subnet that meets the subnet requirement, for example both subnets ‘net A’ and ‘net D’ were allocated 14 hosts, which meet or exceed the number of host addresses required in ‘net A’ and ‘net D’. You can play with the fields in order to obtain different results for subnet mask, number of subnets, and host per subnet. To subnet a network is to create logical divisions of the network. How many hosts per subnet do we need? 2 y – 2 = number of hosts per subnet. This leaves 12 bits for the host ID, for a maximum of 4,094 hosts per subnet. With 1 subnet bit, we can have 2 1 or 2 subnets. A subnet mask neither works like an IP address nor does it exist independently of them. 4 subnets and 16382 hosts per subnet. In our example, we borrow 8 bits so we will have 2 n = 2 8 = 256 subnets! How many hosts per subnet? The number of hosts per subnet is depended on the Host part, which is indicated by the “0” part of the subnet mask. IP to Calculate from: All subnets for 192. In Part 1, you will determine the network and broadcast addresses, as well as the number of hosts, given an IPv4 address and subnet mask. However, the more subnets available, the less host addresses available per subnet. 0/27 and 195. 0 and the new custom subnet mask is 255. Consider a single network having IP Address 200. The information returned is Network address, all possible subnets, the class of the IP, how many hosts per subnet, how many subnets, and binary representations of the address information. What subnet mask should you use? Step 1: Determine how many subnet bits (1's), you have to add to the classful boundary to cover the number of required subnets. How many hosts per subnet do we need? 2 y – 2 = number of hosts per subnet. For connecting a host in big quantity and WAN communication systems, the Class B subnetting is very effective as it gives a wide range of IP’s for configuration. Each lists a class A, B, or C network, and a mask. Remember, the first two octets of a Class B network is used to represent the network and the last two octets are used to represent the host. This method is preferred when the various subnets have substantial differences in the number of hosts that they need per subnet. With 2 bits, 2 2 or 4 subnets, with 3 bits, 2 3 or 8 subnets, etc. "How to Calculate. The existing default subnet mask was 255. To calculate how many of each you use the same formula with slightly different input. For each subnet-24 bits identify the global network. There are also many online subnet calculators available like this one. VLSM Review. Display subnet parameters for a number of consecutive subnets of the specified length. Then, for each, calculate: The number of subnets that exist; The number of usable host IP addresses per subnet. 6 bits identify the host. 2; x y; 8 – 2; Calculating Hosts in Subnets. SolarWinds Advanced Subnet Calculator also generates a range of subnets based on these settings. Applying the subnet mask to an IP address splits the address into two parts, an extended network address, and a host address. I have 4 subnets so it’s no problem, but I’m still wasting a lot of IP addresses. divide a network into little subnets. 0 30 hosts per subnet. but I need to know how to calculate the subnet bits and the maximum number of subnet bits. 0 and the new custom subnet mask is 255. M=Number of Masked bits. maximum subnets= 4 host per subnets=62 I understand very good that wildcards mask is 255-192=63 ,and I understand also why subnets is =62 but: 1- subnet bits = 2 what exactly it means this subnetbits is equal to 2 is that means that 1 is for network and the other is for broadcasting or something else?. Means there will be 2^22 hosts in a subnet and there will be two subnets. IP Subnet Calculator. Subnets, hosts, and broadcast addresses in a subnet. One subnet for 2 hosts (point-to-point links are a good example where you only need 2 IP host addresses). 256 - 240 = 16. We get block size by subtracting decimal value of the subnet bits from the maximum value of the octet, that is 2^8 is equal to. What subnet mask should you use? Step 1: Determine how many subnet bits (1's), you have to add to the classful boundary to cover the number of required subnets. When you subnet you are setting up a number of subnets and a number of hosts. How many subnets and hosts-per-subnet you can create with a subnet mask of 255. Calculate the Valid host Range. 6 bits identify the host. Our subnetting calculator is a great tool for those trying to learn how to subnet. 1 are: CIDR block. ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. Repeat until all addresses are listed. This group of pages has my contributions to the Internet community. Display subnet parameters for a number of consecutive subnets of the specified length. 2; x y; 8 – 2; Calculating Hosts in Subnets. You can see subnet 172. Possible Number of Hosts per Subnet. The above table shows the details of the number of subnets and hosts that can be connected per subnet mask by using Class B subnetting Scheme. Convert the subnet mask 255. ShunIPCalc enables you to calculate subnet masks, subnet addresses, and broadcast addresses. This tip, reposted from SearchNetworking. With our calculator you can see all of the information relevant to your work. Your company wants to utilize the private Class C IP Address of 192. The formula used to calculate the number of available hosts per subnet or network given the specific network mask. The following utility calculates the network and broadcast addresses that a given IP address is associated with. Subnet bits = 12bits. It can even generate reports. Can you show me visually how you came up with 512 (- 2, of course) and how the mask comes out to be 255. The all-zeros host value and the all-ones host value are reserved for the network address of the subnet and its broadcast address, respectively. The Subnet Mask and Class determines how many subnets and hosts you get (i. 0 but it is 255. Next, determine the number of subnet bits required. Available Hosts per Subnet. So the usable hosts is actually 2 y-2 where y is the amount of host bits. In the example above, the formula is thirty-two (the class boundary) minus twenty-seven (the subnet mask) therefore (32 – 27) = 5. This type of notation is also known as CIDR. Be careful when subnetting and make sure that your Address ranges for each subnet are correct. Therefore, the total number of hosts per subnet becomes (2^3) – 2. I need to determine the new subnet mask showing it in dotted decimal and as a binary field, calculate the actual numbers of subnets and host in each subnet, determine if the company can subnet as desired. IP addressing and subnetting: Calculate a subnet mask using the subnet’s formula. Because of the scale of IPv6, one no longer really worries about how many hosts are on a subnet. And I had scenario as follow: My router gate way ip is 10. y is the number of 0s in the subnet mask. Rule 2 The formula used to calculate the number of available subnets given the specific length of network mask. Calculate number of hosts in a subnet. Each subnet will start with an IP address and end at some IP address. How many subnets and hosts per subnet can you get from the network 172. 1 are: CIDR block. That is to say there’s a DHCP server running in Azure, and depending on which subnet your VM is connected to the DHCP server allocates it an IP address. Possible Number of Hosts per Subnet. Binary ANDing will help you determine the subnet for this problem, which results in the network 172. subnets works to calculate the number of hosts, in which b becomes the number of bits in the host address—namely 2b – 2, or 27 – 2, which equals 128 – 2, or 126. Classful Subnet Creator - calculates subnets based on subnet mask, mask bits, host bits, number of subnets and hosts per subnet. SolarWinds Advanced Subnet Calculator also generates a range of subnets based on these settings. Subnetting the easy way - posted in How-To Guides and Tutorials: Subnetting the easy wayBelow are some scenarios which will help you to learn subnetting more easily * Scenario 1 - Given a network address and subnet mask - How many subnets can you have and how many hosts per subnet. “Host many hosts per subnet” This post gives you practice, plain and simple. The Subnet mask is changed accordingly to reflect subnetting. 0 so on so forth for a total of 2^7 (7 bits borrowed)=128 subnets. The number of host IDs on a network is variable, but the network ID must be the same for all hosts on a segment. IPv6 subnets are usually /64 because that is required in order for SLAAC (stateless address autoconfiguration) to work. The formula used to calculate the number of available hosts per subnet or network given the specific network mask. No specific skills are needed for using this calculator, it is available for all users. REVIEW: To determine the network address, perform binary ANDing on the IPv4 address using the subnet mask provided. The formulas to calculate the number of hosts per subnet and the number of subnets created still apply. Binary ANDing will help you determine the subnet for this problem, which results in the network 172. In this question, 7 subnets are needed. (You can tell the DHCP server to always assign the same IP address to your VM – I. This leaves 12 bits for the host ID, for a maximum of 4,094 hosts per subnet. This type of notation is also known as CIDR. Virtual Private Cloud (VPC) network overview A Virtual Private Cloud network, sometimes just called a "network," is a virtual version of a physical network, like a data center network. Assume we are planning to subnet a Class B network with an initial subnet mask of 255. Subnet A would be 172. Visit the Class B Subnetting summary table. ) Subnets per network. 0" The subnets have to be 172. x/24 The default subnet should be 255. Adding ones to the subnet mask means you get fewer hosts per network subnet but more network subnets. Network IP / Subnet Calculator: Free Android app (4. How many subnets and hosts per subnet can you get from the network 172. An organization has a Class C network 200. I have 4 subnets so it’s no problem, but I’m still wasting a lot of IP addresses. (You rarely would need to know beyond 2^12, and even if you did you can calculate it manually. Archive Have a look in the archives for the new version 0. How to Find the Number of Subnets Valid Hosts System Engineer. It provides the following information. Calculate IP addresses and subnet mask for 3 nodes (indexes are listed into the 3rd line) for three subnets (indexes are listed in the 2nd line). 0 = /24 = 255. Using Δ 1 , Δ 2 and Δ 3 value, the 2 subnets are given below. b) How many subnets are available if a class C address has six bits of subnetting? How many host addresses are available per subnet. An example will help you understand the subnetting concept. After you determine the number of bits you have borrowed for subnetting, you the following formulas to find out the number of subnets and number of hosts per subnet. No specific skills are needed for using this calculator, it is available for all users. The easiest way to find the hosts is to write out the subnet address and the broadcast address. Your job is to plan a network. subnets works to calculate the number of hosts, in which b becomes the number of bits in the host address—namely 2b – 2, or 27 – 2, which equals 128 – 2, or 126. 5 ★, 100,000+ downloads) → An application for calculating IPv4 address CIDR Classful IP Conversion Supernet An. Subnetting a Class C Address Using the Fast Way. Example: Subnet IP: 172. If the value is 0, please put in a 0. The IP Address and Subnet mask is show in Binary format. If the subnet mask is 255. After that, new subnet will start. This networking tool performs DNS resolution, address translation, supports CIDR and Address Class information. Enter your IP address and play with the second netmask until the result matches your need. There is also a callout pointing to the 6 remaining host bits showing that there are 62 valid hosts on each of these subnets (2^6-2 = 62 hosts per subnet). To satisfy the 250 hosts requirement, we leave 8 hosts bits (2 8 – 2 = 254 hosts per subnet). Below is a simple subnet table that makes it easier for calculating subnets. How many subnets and hosts per subnet can you get from the network 172. System Engineer 77,514 views. Finally, you need to determine the first host, last host, and broadcast address for each subnet. A class C address has 8 bits in host space. Lets us the magic number. If they're all 1, it's the broadcast address for that subnet. Returns the list of hosts within a subnet. The formula to calculate the number of hosts is 2 k. Calculate IP addresses and subnet mask for 3 nodes (indexes are listed into the 3rd line) for three subnets (indexes are listed in the 2nd line). 252? First use Table 2 to convert 252 to 1111 1 1 00. To calculate the number of hosts possible for each subnet, do the same calculation, except that for the value of N, you use the TOTAL number of host bits available in the address. VLSM Review. Its seems people are forgetting that this is a VLSM with a class B address. The mask with the most subnet bits: The mask for which the wildcard bits were set to binary 1, thereby making the subnet part of the addresses larger, maximizes the number of subnets and minimizes the number of hosts per subnet. This subnet calculator can help you with the following tasks: Identify subnet parameters for a given IP address and subnet mask (or CIDR prefix). 5) or in CIDR notation (e. y is the number of 0s in the subnet mask. Manages IPv4 and IPv6 addresses and subnets. If you wanted 5 different masks using VLSM I would need to know how many hosts per subnet so that I could find the appropriate mask for each. If you do not remember the ‘first octet rule’, which determines the class and the default network mask of an IP address, use the following table as the reference. Calculate the total number of hosts per subnet You should plan ahead and choose the best subnet mask the first time. Using the above example, for subnet 10. 1 are: CIDR block. Can you show me visually how you came up with 512 (- 2, of course) and how the mask comes out to be 255. How to determine the number of subnets and the number of hosts per subnet Two formulas can provide this basic information: Number of subnets = 2 s (Second subnet formula: Number of subnets = 2s - 2) Number of hosts per subnet = 2 h - 2 Both formulas calculate the number of hosts or subnets based on the number of binary bits used. Even though the number of subnets is increased, the number of hosts per subnet is decreased. Except for some special cases like point to point links, each subnet just simply has way more addresses available than it will ever require, so instead you worry only about allocating subnets, not hosts inside them. "Enter the maximum number of valid subnets and hosts per subnet that you can get from the network 172. This guide helps you understand how to calculate a subnet mask, including understanding how a subnet mask works, stepping you through the calculation itself, giving you handy tricks for subnetting and IP addressing, and pointing you to a subnet calculator you can use. Everything left is the available number of hosts on each individual subnet. Remember,the whole purpose of this exercise is to compare the number of hosts needed for each subnet to the number you just calculated. Repeat until all addresses are listed. 224 into binary. System Engineer 77,514 views. Means there will be 2^22 hosts in a subnet and there will be two subnets. SolarWinds Advanced Subnet Calculator also supports resolution of IP address owners to aid in managing your network. 0 = 11111111 11111111 00000000 00000000 (in binary) I am going to add 1s right after the last 1 on the right (in the middle of the mask, between the 1s and 0s). In this Class B Subnetting Tutorial - Part 1, you will learn how to subnet a Class B network. The three 0’s in our binary subnet octet (11111000) indicate that there are three bits used to identify a host. To calculate hosts for each subnet, look at the third and fourth octet. To get all these information, we have to get a block size. I need to determine the new subnet mask showing it in dotted decimal and as a binary field, calculate the actual numbers of subnets and host in each subnet, determine if the company can subnet as desired. 5 ★, 100,000+ downloads) → An application for calculating IPv4 address CIDR Classful IP Conversion Supernet An. The preceding sections focused on a classful range of IP addresses. The formula to calculate the number of hosts is 2 k. 27 rooms per building: add one for not using subnet zero. If you're wondering how to figure out what subnet mask to use when you need X hosts and X networks, this tutorial is perfect for you. The Subnet mask is changed accordingly to reflect subnetting. The above table shows the details of the number of subnets and hosts that can be connected per subnet mask by using Class B subnetting Scheme. IP Calculator. That question is usually accompanied by a size of the subnets that you are looking to number. Subnet mask represented in dotted decimal and in hex; The number of bits in the network and host portions; The number of subnets and the number of hosts per subnet. Display subnet parameters for a number of consecutive subnets of the specified length. How many subnets and hosts-per-subnet you can create with a subnet mask of 255. Given the complexity of IP addressing and subnet masks, your customers are likely to depend on you to support these services on their IP-based networks. To calculate the number of subnets or nodes, use the formula (2 n -2) where n = number of bits in either field, and 2 n represents 2 raised to the nth power. I have 4 subnets so it’s no problem, but I’m still wasting a lot of IP addresses. We get block size by subtracting decimal value of the subnet bits from the maximum value of the octet, that is 2^8 is equal to. 0, the subnets jump in 8's, 8 - 1 = 7 and 8 + 7 = 15 so, taking it as given that the final octet will be all one's for the broadcast. IPv6 is a complete and different animal as far as subnetting goes. I understand how a subnet mask works, how to find the ranges, etc. Click on Calculate; Supernet information will be displayed; Features of CIDR Calculator You can get following supernet information using CIDR Calculator. Simply input a starting IP address, and your choice of subnet bits or the maximum number of desired subnets or the host bits or the maximum number of desired hosts, and the calculator figures out the all the rest, including a list of subnets. IP addresses in a particular subnet will be its range. Archive Have a look in the archives for the new version 0. So, in all, subnetting is necessary in IPv6, but not for the reasons why we did it with IPv4. If the subnet mask is 255. The IP address given was a class B address, making the first 16 subnet bits static. This is the reason why network engineers required to calculate the number of subnets obtained by borrowing three bits would calculate 2 3-2 (6) and not 2 3 (8). 0 but it is 255. If so, 4 bits for subnet ID won't suffice: we need 5 bits (2 5 =32). Well, a shortcut to calculate the number of host in a subnet (Works on Class C only) Maximum bits in the fourth octet = 11111111 = 256 in decimal. In IPv6, the network prefix performs a similar function as the subnet mask in IPv4,. We assume in our calculations that all-zeros and all-ones subnets can be used. The -2 takes into account that subnet zero and the all-ones subnet are not used traditionally. Number of Subnets - "( )" Refers to the number of effective subnets, since the use of subnet numbers of all 0s or all 1s is highly frowned upon and RFC non-compliant. You calculate that this gives you __ subnets and __ hosts per subnet. The formulas to calculate the number of hosts per subnet and the number of subnets created still apply. You calculate that this gives you __ subnets and __ hosts per subnet. 0/24 network based on the maximum number of hosts required by the largest subnet. The IP address given was a class B address, making the first 16 subnet bits static. Z is what determines the hosts, and since z has 16 possible values per subnet, this tells you how many hosts you can have inside each subnet: 16, though only 14 are usable (this goes back to what I said at the beginning of the post: the first and last address of a subnet are reserved). IP Custom Subnet Masks (Page 4 of 4) Subtracting Two From the Number of Hosts Per Subnet and (Possibly) Subnets Per Network. Next, determine the number of subnet bits required. The result expected is the number of subnets and valid hosts that are available with a /24 subnet mask. I'm trying to calculate the number of hosts per subnet given a subnet IP address and the subnet mask. 0 and a mask of 255. One subnet for 12 hosts. Even though the number of subnets is increased, the number of hosts per subnet is decreased. If you're wondering how to figure out what subnet mask to use when you need X hosts and X networks, this tutorial is perfect for you. The formulas to calculate the number. You can use the subnet mask calculation formula. There are 145 hosts in all. subnets works to calculate the number of hosts, in which b becomes the number of bits in the host address—namely 2b – 2, or 27 – 2, which equals 128 – 2, or 126. Can you show me visually how you came up with 512 (- 2, of course) and how the mask comes out to be 255. Subnetting Principles 1.