TechKnowSurge
CompTIA Network+ 1.7 Cisco CCNA 1.6 Cisco CCST Networking 2.2
InteractiveNetworkFree

Bits to Borrow Calculator

Given how many subnets and hosts a network needs, type how many bits to borrow, or X when no line works.

⚑ Complete this interactive to capture a CTF flag worth 5 points.

About this interactive

Choosing a subnet mask is choosing how many host bits to borrow, and two needs pull against each other. The number of subnets sets a floor: borrowing b bits gives 2^b subnets, so 20 subnets need at least 5 bits (32). The hosts in each subnet set a ceiling: the bits left on the host side must still give enough usable addresses, 2^h - 2, so on a Class C network 5 usable hosts allow at most 5 borrowed bits (6 usable). Here the floor and the ceiling meet at 5, so you borrow 5. When the floor is above the ceiling, no line works on that network: 10 subnets of 20 hosts on a Class C needs at least 4 bits for the subnets, but 4 bits leave only 14 usable hosts. When there are several lines between the floor and the ceiling, pick by growth. If the hosts in each subnet will grow, borrow the fewest bits and keep the host side big. If the number of subnets will grow, borrow the most the hosts allow. If you want room for both, take the middle line. On a Class B network the same steps run over 16 host bits instead of 8: 8 subnets of 5,000 hosts borrows exactly 3 bits, since 4 would leave only 4,094. This set stops at /30. Type the number of bits, or X if no number of bits meets both needs. Anything you miss shows the answer and how to work it out. Seven of the twenty-three questions are drawn each run.

What you'll learn

Aligned to

CompTIA Network+
1.7 Given a scenario, use appropriate IPv4 network addressing.
Cisco CCNA
1.6 Configure and verify IPv4 addressing and subnetting
Cisco CCST Networking
2.2 Identify IPv4 addresses and subnet formats

Key terms

Bits Borrowed
The number of bits taken from the host portion of an IP address to create additional subnet identifiers, directly controlling the trade-off between number of subnets and number of hosts per subnet.
Network Capacity
The maximum number of subnets available given a specific number of bits borrowed, calculated as 2 raised to the power of borrowed bits.
Host Capacity
The maximum number of usable host addresses per subnet, calculated as 2 raised to the power of remaining host bits minus 2 (reserving the network and broadcast addresses).
Network Growth
The anticipated increase in the number of subnets or hosts on a network, used as a factor when selecting how many bits to borrow during subnetting.
Usable Hosts
The number of valid host addresses within a subnet, calculated by subtracting two from the total host count to exclude the network and broadcast addresses.
Subnet
A logical subdivision of an IP network, used to organize and segment network traffic.

Topics

Subnetting Bits Borrowed Subnet Design Interactive Calculation

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →