Why calculate offline?
Most subnet calculators are server-backed. When you enter an IP address, the calculation happens on a remote server and your input is transmitted over the network. For internal network addresses, private ranges, or addresses containing sensitive topology information, this creates an unnecessary exposure even when the connection is encrypted, because the server still sees the exact address you typed.
CapyToolkit processes all subnet calculations locally in your browser using JavaScript bitwise operations for IPv4 and BigInt arithmetic for IPv6. Nothing leaves your machine, and no server records the network ranges you are working with. You can load the page once, disconnect from the internet, and the tool will keep working because all of the logic is already downloaded into your browser.
Subnet basics
A subnet is a logical subdivision of an IP network, and the rules that govern how traffic moves between subnets are the same whether you are wiring up a home lab or designing a regional cloud footprint. Understanding how the network and host portions of an IP address interact is the foundation for everything else in this article, from reading the calculator results to planning variable-length allocations.
The key insight is that the boundary between network and host bits is not fixed by the IP address itself, it is defined by the subnet mask or CIDR prefix. Move the boundary one bit to the right and you double the number of networks while halving the number of hosts in each. That trade-off is the basic lever every network designer pulls when carving a block into smaller pieces, and the calculator makes the arithmetic explicit so you can verify the result before committing it to a routing table or a cloud configuration.
Network and host portions
CIDR (Classless Inter-Domain Routing) notation splits an IP address into a
network portion and a host portion. The number after the slash tells you
how many bits from the left identify the network. For example, 192.168.1.0/24 means the first 24 bits (255.255.255.0 mask) define the network, leaving 8
bits for host addresses (256 total, 254 usable). Each extra bit you add to
the prefix doubles the number of networks you can create while halving the
number of hosts in each one.1
Subnet masks and broadcast addresses
The subnet mask in binary is a sequence of 1-bits followed by 0-bits. A
/24 mask is
11111111.11111111.11111111.00000000 in dotted binary, or 255.255.255.0 in decimal. The network address is the IP with the host bits set to 0, and
the broadcast address (IPv4) has all host bits set to 1.1 Because the
network and broadcast addresses cannot be assigned to devices, the usable
host count for a /24 is 256 minus 2, or 254.
IPv4 vs IPv6
IPv4 and IPv6 are two generations of the Internet Protocol that coexist on most networks today. They share the same fundamental idea, an address identifies a host and a prefix length defines the network boundary, but they differ in address size, notation, and several behaviours that affect subnetting. The calculator handles both, and the results panel adapts to whichever format you enter.
IPv4 addressing and exhaustion
IPv4 addresses are 32 bits, written as four decimal octets (0-255)
separated by dots.2 With roughly 4.3 billion
addresses total, the global IPv4 pool was exhausted in 2011, which is why
private ranges and network address translation are now standard in most
networks.3 Private IPv4 ranges such as
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for private
internets rather than public routing, so the same blocks can be reused in
separate organisations without conflict.2
IPv6 addressing and multicast
IPv6 uses 128-bit addresses written in hexadecimal groups separated by colons, providing 2^128 addresses, enough to assign trillions to every square millimeter of the earth's surface.4 There are no broadcast addresses in IPv6; that role is superseded by multicast, which delivers packets only to the interfaces that joined a particular group. The "Last Address" field replaces "Broadcast Address" for this reason, and every address in an IPv6 subnet is usable, so the usable host count equals the total address count.4
Because IPv6 subnets are normally allocated a /64 for the interface
identifier, even a single link has more addresses than the entire IPv4
internet combined, which is why address exhaustion is effectively a
non-issue for new network deployments that standardise on IPv6 and why
providers can hand out enormous blocks without worrying about conservation.
Reading your results
The results table shows 16 fields grouped around the same subnet you typed in. Start with Network Address and CIDR Notation to confirm the correct subnet, then check Usable Hosts to see how many devices can be assigned within that range. The Binary fields show the exact bit patterns, which helps you understand how the prefix length works at the bit level and why certain host counts jump in powers of two.
Hex Range Start and Hex Range End render the same subnet boundaries in hexadecimal, which is useful when you are working with low-level network tools, debugging routing tables, or comparing ranges against switch configurations. CapyToolkit displays every value so you can copy exactly the field you need without reformatting it yourself.
Variable-length subnetting and address efficiency
In the early internet, network blocks were assigned in fixed classes, and an organisation that needed 300 addresses was handed a /24 with 256 slots or a /23 with 512, whether it wanted the extra addresses or not. Variable-length subnet masking replaced that rigidity with a way to size each subnet to its actual need, so a point-to-point link can take a tiny /31 while a busy floor takes a /25, both drawn from the same parent block.
From classful blocks to variable masks
Classful networking assigned fixed-size blocks: Class A for large
organisations (16 million addresses), Class B for medium ones (65,000
addresses), and Class C for small ones (256 addresses). This wasted
enormous address space because organisations were assigned blocks much
larger than they needed. VLSM (Variable Length Subnet Masking) replaced
classful allocation by letting network designers carve an address block
into subnets of exactly the sizes required, so a point-to-point link can
take a tiny /31 while a busy floor takes a /25, both drawn from the same
parent block.5 RFC 3021 defines a /31 as a point-to-point link where both addresses are usable, since there is no broadcast on a link with only two endpoints.6 A /30 gives four addresses and two usable hosts, while a /25 gives 128 addresses and 126 usable hosts for a floor with many workstations.7
Alignment rules for VLSM subnets
Calculating VLSM allocations manually is error-prone because each subnet's
boundaries must align on power-of-two address boundaries. A /26 subnet (64
addresses) must start at an address divisible by 64: 0, 64, 128, or 192
within any octet. Placing a /26 starting at 32 is invalid. This calculator
shows the exact network address and usable range for any IP and prefix,
making it straightforward to verify alignment and avoid the overlap errors
that misconfigured VLSM networks introduce.
Subnetting in cloud VPC design
Cloud providers require subnets within a Virtual Private Cloud (VPC) to be
non-overlapping and sized to accommodate the services placed in them. AWS
requires a minimum /28 subnet (16 addresses), but reserves five addresses
per subnet for internal use, leaving 11 usable.7 Azure reserves the first four and last address in each subnet, leaving a /29
with only three usable hosts.8 Kubernetes
node pools typically need enough addresses for nodes, pods, and load balancer
IPs; a /22 per availability zone (1024 addresses) is a common starting point
for medium workloads.9 Calculating
the correct prefix for your expected instance count, scaling headroom, and provider
reservations before you create a VPC saves the significant operational pain of
re-addressing a live, production environment later.
Cloud VPC Subnet Minimums
- AWS VPC minimum /28 (16 addresses, 5 reserved, 11 usable)
- Azure VNet minimum /29 (8 addresses, 5 reserved, 3 usable)
- Kubernetes AZ starting point /22 (1024 addresses)
Calculate your own subnet above and compare it against these common cloud minimums.
- 1.
V. Fuller and T. Li, "Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan," RFC 4632, IETF, August 2006. https://www.rfc-editor.org/rfc/rfc4632
- 2.
Oracle, "Designing an IPv4 Addressing Scheme," docs.oracle.com, 2010. https://docs.oracle.com/cd/E19253-01/816-4554/ipplan-5/index.html
- 3.
"IPv4 address exhaustion," Wikipedia, accessed June 2026. https://en.wikipedia.org/wiki/IPv4_address_exhaustion
- 4.
R. Hinden and S. Deering, "IP Version 6 Addressing Architecture," RFC 4291, IETF, February 2006. https://www.rfc-editor.org/rfc/rfc4291
- 5.
V. Fuller, T. Li, J. Yu, and K. Varadhan, "Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy," RFC 1519, IETF, September 1993. https://www.ietf.org/rfc/rfc1519.txt
- 6.
A. Retana, R. White, V. Fuller, and D. McPherson, "Using 31-Bit Prefixes on IPv4 Point-to-Point Links," RFC 3021, IETF, December 2000. https://www.ietf.org/rfc/rfc3021.txt
- 7.
Amazon Web Services, "Subnet CIDR blocks," docs.aws.amazon.com, accessed June 2026. https://docs.aws.amazon.com/vpc/latest/userguide/subnet-sizing.html
- 8.
Microsoft Learn, "Private IP addresses in Azure," learn.microsoft.com, November 2024. https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/private-ip-addresses
- 9.
Microsoft Learn, "Concepts - IP address planning in Azure Kubernetes Service (AKS)," learn.microsoft.com, April 2026. https://learn.microsoft.com/en-us/azure/aks/concepts-network-ip-address-planning