Network

Subnet Count Calculator

Calculate how many subnets and hosts per subnet result when you borrow bits from a network, from the base and new prefix lengths.

Last reviewed by the Radiatus Cloud team

Find how many subnets and hosts per subnet you get by extending a prefix.

Need this monitored 24/7?

Radiatus delivers managed cloud & network operations.

Discuss managed ops

Count subnets and hosts when subnetting

When you divide a network into smaller subnets, you borrow bits from the host portion to create a subnet portion. This calculator shows the result: the number of bits borrowed equals the difference between the new prefix and the base prefix, the number of subnets is two raised to that power, and the hosts per subnet is two raised to the number of remaining host bits, minus two for the network and broadcast addresses. Enter the base prefix, such as /24, and the new longer prefix, such as /27, to see the full breakdown.

For the common example of splitting a /24 into /27 subnets, you borrow three bits, giving eight subnets of thirty usable hosts each.

Planning address space

Subnet counting is essential when designing networks, where you must balance the number of subnets you need against the number of hosts each must hold. Borrowing more bits creates more subnets but shrinks each one, a trade-off that this tool makes explicit. It is also a staple of networking exams, which frequently ask how many subnets and hosts a given prefix change produces.

The usable host count excludes the network and broadcast addresses for prefixes up to /30; /31 links have two usable addresses and /32 is a single host. All calculation happens locally in your browser.

Related tools

  • Port Scanner — Check which common ports respond on a host and understand what each exposed service means. Scan only systems you are authorised to test.
  • DNS Misconfiguration — Analyze DNS records (TXT, SPF) for security gaps.
  • TLS Compat Tester — Check client-server compatibility for TLS versions.
  • Firewall Rule Risk — Evaluate firewall rules for over-permissive exposure.

Frequently Asked Questions

What does borrowing bits mean?

It means taking bits from the host portion of an address to create a subnet portion, which lets you divide one network into several smaller ones.

How many subnets do I get?

The number of subnets is two raised to the number of borrowed bits, which is the difference between the new prefix and the base prefix.

How many hosts fit in each subnet?

Each subnet holds two raised to the number of remaining host bits, minus two addresses reserved for the network and broadcast.

Why subtract two from the host count?

The first address in a subnet is the network address and the last is the broadcast address, neither of which can be assigned to a device.

What about /31 and /32 prefixes?

A /31 provides two usable addresses for point-to-point links, and a /32 represents a single host, so the usual minus-two rule does not apply.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Enter the base prefix and the new (longer) prefix to get subnet and host counts.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.