IP Subnet Calculator: CIDR, VLSM and Host Capacity
Calculate IPv4 and IPv6 prefixes, visualize network and host bits, and build a VLSM allocation plan for multiple departments or services.
Address and planning input
Choose IPv4, IPv6 or VLSM mode. Results update automatically.
VLSM planner
| # | Subnet name | Required hosts | Reserved |
|---|
Subnet calculation result
Network range, capacity, binary view and allocation details.
| # | Name | Hosts | Reserve | CIDR | First host | Last host | Broadcast | Usable |
|---|
Methodology
METHODOLOGY
CIDR calculation
The prefix length creates a contiguous subnet mask. Network and broadcast addresses are derived with bitwise AND and wildcard operations.
/31 and /32
A /31 is treated as a two-address point-to-point subnet, while a /32 represents one host route.
VLSM allocation
Requirements are sorted from largest to smallest and aligned to the next valid network boundary before allocation.
IPv6 prefixes
IPv6 results use 128-bit integer arithmetic and show the network, last address, host bits and subnet count from the parent prefix.
Subnet sizing method
For IPv4 prefix length p, total addresses are 232−p. A conventional subnet has total minus two usable hosts; /31 point-to-point links follow RFC 3021 and /32 is a single host route. VLSM assigns the smallest prefix that fits required hosts plus reserved addresses, then aligns each block on its prefix boundary.
Example: a department needing 50 hosts plus 4 reserved addresses requires 54 addresses; the next power of two is 64, so use /26 with 62 conventional usable hosts. Record gateway, infrastructure and growth reservations explicitly.
Engineering limits and links
Address fit does not prove a suitable broadcast or failure domain. Review routing summarization, security zones, DHCP scope and IPv6 policy in the subnet planning guide. Pair the result with network capacity forecasting.
FAQ
Does VLSM reserve a gateway automatically? No. Use the reserve field for gateways, redundancy, infrastructure and growth.
Can IPv6 counts be exact? Yes; the tool uses integer arithmetic, but operational allocation should still follow site prefix policy.
Typical engineering scenarios
WORKED EXAMPLES
Each scenario pre-fills the calculator. The expected result below was computed by the same engine and is covered by automated tests.
Office VLAN: 192.168.10.130/26
Find the network, broadcast and usable range for a 62-host user VLAN.
Router point-to-point link: 10.0.0.0/31 (RFC 3021)
A /31 gives two usable addresses with no network or broadcast address.
Route summary: 172.16.0.0/22 aggregate (RFC 4632)
Four contiguous /24 sites summarised as one CIDR block.
Frequently asked questions
FAQ
How many usable hosts are in a /24?
A /24 has 256 total addresses and normally 254 usable host addresses.
Why does /31 show two usable addresses?
RFC 3021 permits both addresses on a point-to-point link, eliminating network and broadcast reservations.
What is a wildcard mask?
It is the bitwise inverse of the subnet mask and is commonly used in ACLs and routing configuration.
Does VLSM reserve gateway addresses automatically?
Each row has an editable reserve field. Use it for gateways, redundancy addresses, infrastructure or growth.
Can IPv6 addresses be counted exactly?
Yes. The calculator uses BigInt arithmetic and displays the full decimal address count.
Should a large broadcast domain be used just because it fits?
No. Consider failure domains, broadcast traffic, security zones, routing summarization and operational boundaries.
History
PROJECT RECORDS
Standards citations
STANDARDS
Authoritative documents behind the formulas and default values above.
- RFC 4632 (linked in the references section) — Classless Inter-Domain Routing (CIDR) prefixes and route aggregation. [Checked]
- RFC 950 — Internet standard subnetting procedure and subnet masks. [Checked]
- RFC 3021 (linked in the references section) — Using 31-bit prefixes on IPv4 point-to-point links. [Checked]
- RFC 1918 (linked in the references section) — Address allocation for private internets (10/8, 172.16/12, 192.168/16). [Checked]
- RFC 4291 (linked in the references section) — IPv6 addressing architecture. [Checked]
Part of the switching and bandwidth calculators hub.
ENGINEERING WORKFLOW
Continue the engineering workflow
Plan addressing, VLAN capacity, packet size, uplinks, optics, access policy and DNS behavior as one LAN design sequence.