Interactive toolSubnetting & CIDREN master
ToolCIDRHosts

CIDR / Host Calculator

Convert host requirements into CIDR prefixes, or a prefix into usable address capacity. Optionally calculate the IPv4 network, broadcast, block size and host range.

Practical modeEnter your data and review the result

CIDR / Host Calculator

Convert hosts ↔ CIDR prefix and calculate mask, block size, increment and IPv4 ranges.

Calculation mode
Address semantics
Understand the result

What this tool calculates and how to interpret the result.

What the CIDR calculator does

CIDR, or Classless Inter-Domain Routing, represents a network with a prefix such as /24, /26 or /30. The prefix tells you how many IPv4 bits identify the network and, as a result, how many addresses remain inside the block. This calculator works in both directions: you can enter a host requirement and obtain the smallest suitable prefix, or start with a prefix and inspect its capacity.

The calculator also converts the prefix to a dotted-decimal mask, shows the block size and subnet increment, and can normalize an IPv4 address into its network and broadcast boundaries. That makes it useful both as a quick calculator and as a way to check manual subnetting work against the concepts explained in the subnetting guide.

How to use hosts to prefix mode

Select Hosts → prefix, enter the number of required hosts and choose the address semantics. For a traditional LAN, the calculator reserves the network and broadcast addresses where that rule applies. For point-to-point work, RFC 3021 semantics allow a /31 to use both addresses. The exact mode counts every address in the block without applying host-reservation assumptions.

For example, a requirement of 50 traditional IPv4 hosts needs a /26 because a /26 contains 64 total addresses and 62 traditionally usable host addresses. If you provide a base address such as 192.168.10.70, the tool also shows the normalized network, broadcast and usable range.

How to use prefix to hosts mode

Select Prefix → hosts when the CIDR value is already known. A /24 contains 256 total addresses, a /25 contains 128, a /26 contains 64, and each additional network bit halves the block again. The tool reports the corresponding mask and capacity so you do not need to memorize the whole table.

If you are studying, compare the result with the IP addressing guide and the FLSM guide. The goal is not only to obtain a number, but to understand why changing the prefix changes the network size.

Why block size and subnet increment matter

Subnetting becomes easier when you can recognize the changing octet and its increment. With a /26 mask of 255.255.255.192, the final octet advances in blocks of 64: 0, 64, 128 and 192. A host address can therefore be placed into the correct subnet quickly by locating the surrounding multiples of the increment.

The block size is also helpful when checking whether two candidate subnets overlap. For more advanced planning, use the Spanish overlap checker until its EN variant is published, or review the route aggregation concepts in the supernetting guide.

Important edge cases: /31 and /32

Traditional subnetting rules often teach that every subnet loses one address to the network identifier and one to broadcast. That simplified rule is not universal. RFC 3021 defines the use of /31 on IPv4 point-to-point links, where both addresses can identify endpoints. A /32 represents a single host route rather than a multi-host broadcast subnet. The calculator exposes these semantics explicitly instead of silently applying “minus two” to every prefix.

Frequently asked questions

What is the difference between CIDR and a subnet mask?

They describe the same prefix length in different notation. /24 corresponds to 255.255.255.0, while /26 corresponds to 255.255.255.192.

Which prefix do I need for 100 hosts?

For a traditional IPv4 LAN, /25 provides 128 total addresses and 126 traditionally usable host addresses.

Why does a larger CIDR number mean a smaller network?

A larger prefix allocates more bits to the network portion and leaves fewer bits for addresses inside the block.

Can I use this calculator for IPv6?

The host-capacity logic is different for IPv6. Use the dedicated IPv6 tools and guides for IPv6 prefix planning rather than applying IPv4 broadcast assumptions.

Next step

Once CIDR notation feels natural, practice complete network plans with the FLSM calculator or VLSM calculator. Those tools turn the same prefix logic into multiple subnets and make the relationship between requirements, prefix length and address ranges much easier to see.