Subnet Calculator

Subnet Calculator

Growing networks rarely stay flat. Departments want separation, servers want isolation, guests want their own sandbox, and each of those segments needs its own subnet carved from the available address space. Subnetting is the technique that divides one network into many, and the Subnet Calculator does the planning math for you. Enter the starting network, its current prefix, and how many subnets you need, and it tells you how many bits to borrow, the new prefix and mask, the hosts per subnet, and the actual address ranges of the resulting subnets.

How Subnetting Works

Subnetting borrows bits from the host portion of an address and adds them to the network portion. Each borrowed bit doubles the number of subnets and halves the hosts per subnet. Starting from 192.168.0.0/24 and borrowing 2 bits creates 4 subnets, each a /26 with 62 usable hosts. Borrowing 3 bits creates 8 subnets, each a /27 with 30 usable hosts. The key formula is simple: the number of subnets equals 2 raised to the borrowed-bit count. You choose the smallest borrowed-bit count whose subnet count covers what you need, and the calculator finds it automatically.

How to Use the Subnet Calculator

Splitting a network takes three inputs:

1. Enter the network IP address. Type the base network you want to divide, for example 192.168.0.0. The tool aligns it to the starting prefix automatically.

2. Enter the current CIDR prefix. Type the prefix length of the starting network, from 0 to 30, for example 24.

3. Enter the number of subnets needed. Type how many separate subnets you want, for example 4 for four departments.

4. Click Calculate. The panel shows the borrowed bits, the new prefix, the new subnet mask, how many subnets are created, the usable hosts per subnet, and the usable address ranges of the first subnets.

5. Reset to divide another network. The Reset button clears the form for the next design.

Worked Example: Split 192.168.0.0/24 Into 4 Subnets

Enter 192.168.0.0 as the network, 24 as the current prefix, and 4 as the number of subnets needed, then click Calculate.

The tool finds the smallest borrowed-bit count where 2 raised to that count covers 4. One bit gives 2 subnets, which is too few; 2 bits give exactly 4. Borrowing 2 bits turns /24 into /26, with the new mask 255.255.255.192. Each /26 holds 64 total addresses and 62 usable hosts. The four subnets divide the 192.168.0.0/24 space into equal quarters.

The calculator reports:

– Borrowed bits: 2

– New prefix: /26

– New subnet mask: 255.255.255.192

– Subnets created: 4

– Hosts per subnet: 62

– Subnet ranges (usable): 192.168.0.1 – 192.168.0.62, 192.168.0.65 – 192.168.0.126, 192.168.0.129 – 192.168.0.190, 192.168.0.193 – 192.168.0.254

Each subnet's network and broadcast addresses sit just outside its usable range: the first subnet is 192.168.0.0/26 with broadcast 192.168.0.63, the second is 192.168.0.64/26 with broadcast 192.168.0.127, and so on.

More Helpful Information

### The borrowing table

A quick reference makes subnet design conversational. Borrow 1 bit for 2 subnets, 2 bits for 4, 3 bits for 8, 4 bits for 16, 5 bits for 32, 6 bits for 64, 7 bits for 128, and 8 bits for 256. Remember that the result is always a power of two: if you need 6 subnets, you borrow 3 bits and get 8, leaving 2 spare subnets for the future.

### Assigning subnets wisely

Give each subnet a purpose and document it: one for servers, one for workstations, one for wireless, one for guests, one for voice, one for management. Keep the numbering orderly so the ranges are easy to remember. Reserve one or two spare subnets for future needs rather than allocating every last one on day one. Consistent allocation turns the address plan into a map anyone can read.

### Subnetting and VLANs

In modern networks each subnet usually rides on its own VLAN, and the router or layer-3 switch routes between them. The subnet plan and the VLAN plan are designed together: VLAN 10 might be 192.168.10.0/24 for servers, VLAN 20 might be 192.168.20.0/24 for staff, and so on. The calculator's subnet ranges become the VLAN address assignments in your documentation.

### Mistakes to avoid

The most expensive mistake is borrowing too few bits and ending up with fewer subnets than departments, forcing a redesign. The second is forgetting that each new subnet loses two addresses to its network and broadcast addresses, which matters when hosts per subnet are small. A third is creating overlapping subnets by hand, which the calculator's listed ranges help you avoid. Finally, always verify that the borrowed-bit count leaves enough host bits: borrowing 7 bits from a /24 leaves a /31, which holds no usable hosts at all.

### When to use VLSM instead

Equal-sized subnets are simple but sometimes wasteful: a point-to-point link does not need 62 hosts. Variable Length Subnet Masking uses different prefix lengths for different subnets, giving each exactly the size it needs. Run this calculator once per subnet size you need, then lay the resulting blocks end to end without overlaps.

Frequently Asked Questions

1. What is subnetting?

Subnetting divides one IP network into smaller subnetworks by borrowing host bits and turning them into network bits, creating multiple independent broadcast domains.

2. How many subnets do I get by borrowing 3 bits?

Borrowing 3 bits creates 8 subnets, since 2 raised to the power of 3 equals 8.

3. How many hosts are in each subnet after borrowing 2 bits from a /24?

Each subnet becomes a /26 with 64 total addresses and 62 usable hosts.

4. What is the new prefix if I borrow 2 bits from a /24?

The new prefix is /26, because 24 plus 2 equals 26, with mask 255.255.255.192.

5. I need 6 subnets. How many bits should I borrow?

Borrow 3 bits, which yields 8 subnets. You cannot create exactly 6 equal subnets, so you take 8 and keep 2 as spares.

6. What are the subnet ranges when splitting 192.168.0.0/24 into 4?

The four /26 subnets have usable ranges 192.168.0.1-62, 192.168.0.65-126, 192.168.0.129-190, and 192.168.0.193-254.

7. Can subnets be different sizes?

Yes, with Variable Length Subnet Masking. Each subnet gets the prefix length that fits its host count, which conserves address space.

8. What happens to the network and broadcast addresses when subnetting?

Each new subnet gets its own network and broadcast addresses, each consuming one address from that subnet's total.

9. How do I know if I borrowed too many bits?

If the hosts per subnet drop below what the segment needs, you over-borrowed. Each borrowed bit halves the hosts per subnet.

10. Why do the subnet ranges matter?

The ranges define exactly which addresses belong to each subnet, so you can assign DHCP scopes, firewall rules, and documentation without overlaps.

11. What is the maximum number of subnets I can create?

It depends on the starting prefix. From a /24 you can borrow up to 6 bits for 64 usable /30 subnets; borrowing more leaves no usable hosts.

12. Do I need a router between subnets?

Yes. Devices on different subnets cannot reach each other directly; a router or layer-3 switch must forward traffic between them.

13. Should each department get its own subnet?

In most designs, yes. Separate subnets enable separate security policies, limit broadcast traffic, and make troubleshooting easier.

14. How does subnetting improve security?

It lets you place firewalls between segments, so a compromised device in one subnet cannot freely reach servers in another.

15. Can I subnet an already subnetted network?

Yes. You can borrow additional bits from any subnet to divide it further, as long as host bits remain for usable addresses.

CONCLUSION

Subnetting turns a single block of addresses into an organized set of networks, each sized and purposed for its role. The Subnet Calculator handles the bit-borrowing math and lays out the resulting ranges clearly, so you can move straight to assigning VLANs, DHCP scopes, and firewall rules. Plan each division deliberately, keep spares in reserve, and your network will grow in an orderly fashion instead of collapsing into one flat, unmanageable broadcast domain.