VLAN & Subnet Calculator
Calculate IP address allocation across VLANs with optimal subnet sizing, growth margin, and utilization analysis.
About this calculator
This calculator works backward from your device count to the smallest subnet block that comfortably fits, per VLAN. It first splits your total device count evenly across the number of VLANs you specify, then inflates that per-VLAN figure by your growth margin, and walks a table of standard CIDR blocks — from a tiny /30 (2 usable hosts) up through a /16 (65,534 hosts) — picking the smallest one whose usable host count still covers the grown figure. From there it derives the dotted-decimal subnet mask and its inverse (the wildcard mask, commonly used in ACLs and OSPF), and computes a rough "supernet" CIDR — the mask that would be needed to summarize all your VLANs into one aggregate route — by subtracting log2(VLAN count) bits from the per-VLAN CIDR, floored at /8.
A key assumption worth knowing: it applies your growth margin per VLAN after the even split, not to the total device pool before splitting — with equal-sized VLANs the math works out the same, but if your VLANs are lopsided in practice, size your largest VLAN separately. It also treats every VLAN as needing the same subnet size, which is a simplification: real deployments often assign asymmetric blocks to a large office VLAN versus a small IoT or guest VLAN. IP utilization tells you how much of your allocated address space is actually in use, so you can judge whether you've over- or under-provisioned.
Inputs
Results
Subnet CIDR
25 bits
Hosts per Subnet
126
Total Usable IPs
504
How to Use This Calculator
- Enter Total Devices, Number of VLANs, and Growth Margin.
- Set Second Octet (10.X.0.0).
- Review Subnet CIDR (bits), Hosts per Subnet, and Total Usable IPs.
- Use Devices per VLAN and Devices + Growth to inform your decision.
- Use the chart to visualize the results and explore different scenarios by adjusting inputs.
How the result changes with Total Devices
| Total Devices | Subnet CIDR | Hosts per Subnet | Total Usable IPs |
|---|---|---|---|
| 100 | 26 bits | 62 | 248 |
| 150 | 26 bits | 62 | 248 |
| 300 | 25 bits | 126 | 504 |
| 500 | 24 bits | 254 | 1,016 |
What each input means
- Total Devices
- Total number of network devices/endpoints to address
- Number of VLANs
- Number of VLANs to distribute devices across
- Growth Margin
- Additional address space for future device growth
- Second Octet (10.X.0.0)
- Second octet for the 10.X.0.0/Y addressing scheme
How this is calculated
Formula
Hosts = 2^(32-CIDR) - 2; CIDR = smallest where Hosts ≥ Devices × (1+Growth)Worked example, using the default values
- Identify Input Parameters4 parametersTotal Devices = 200, Number of VLANs = 4, Growth Margin = 30, Second Octet (10.X.0.0) = 168 = 4 input(s) provided
- Calculate Subnet CIDRSubnet CIDR = 3025 = 25
- Calculate Hosts per SubnetHosts per Subnet126 = 126
- Calculate Total Usable IPsTotal Usable IPs504 = 504
- Calculate Devices per VLANDevices per VLAN50 = 50
- Calculate Devices + GrowthDevices + Growth65 = 65
Engine last updated . Checked against 1 independently-derived test — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why does the calculator apply my growth margin after splitting devices evenly across VLANs, instead of to the total device count first?
It computes devicesPerVlan as Total Devices ÷ VLAN count, then multiplies that per-VLAN figure by (1 + Growth Margin). With evenly sized VLANs this gives the same result as growing the total first and splitting after, but if one VLAN is much larger than the others in your real network, its true future size won't match this shared per-VLAN number — size that VLAN separately.
What is the wildcard mask used for, and how does the calculator derive it?
The wildcard mask is the subnet mask with every octet inverted (255 minus each octet), and it's the format Cisco ACLs and OSPF network statements expect instead of a standard subnet mask. The calculator computes it directly from the chosen CIDR's subnet mask, so the two always stay in sync automatically as you change device count or VLAN count.
What does the 'supernet CIDR' output actually represent?
It's the mask that would be needed to summarize all of your per-VLAN subnets into a single aggregate route, calculated by subtracting log2(VLAN count), rounded up, from the per-VLAN CIDR and flooring the result at /8. It's a planning estimate for route summarization, not a guarantee that your VLANs can actually be allocated as one contiguous block — that depends on how you assign the address ranges in practice.
Why might the recommended subnet be much bigger than what I currently need?
The calculator only offers a fixed ladder of standard CIDR blocks (/30 up through /16) and always rounds up to the smallest one that covers your grown device count — there's no in-between size. If your grown per-VLAN figure is just over a boundary, like 130 devices, you'll jump from a /25 (126 hosts) all the way to a /24 (254 hosts), leaving a lot of unused headroom.
Does the Second Octet input change the subnet or CIDR results?
No. It's collected for reference only and doesn't currently feed into the CIDR, subnet mask, wildcard mask, or any other calculated value — those are all derived purely from device count, VLAN count, and growth margin.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Bandwidth Capacity Planner
Calculate required network bandwidth from user count, application profiles, concurrency, and protocol overhead.
Network DesignSwitch Port Density Calculator
Calculate access, distribution, and core switch count from endpoint count, port requirements, and uplink oversubscription.
Technology & ComputingSubnet Calculator
Calculate subnet mask, network address, broadcast address, usable host range, and CIDR notation for any IP address.
Technology & ComputingNetwork Tools Calculator
Subnet calculator, bandwidth estimator, and VLSM network planning.
Network DesignNetwork Latency Calculator
Calculate round-trip time from hops, distance, processing delays, and queuing. Includes VoIP quality assessment and TCP throughput estimate.
More in Technology & Computing.