VLSM Calculator
Split an IPv4 network into subnets of different sizes with VLSM: enter the hosts each LAN needs and get network, mask, host range, broadcast and wasted addresses.
| Name | Hosts needed | Usable | Prefix | Mask | Network | First host | Last host | Broadcast | Spare |
|---|---|---|---|---|---|---|---|---|---|
| Sales | 100 | 126 | /25 | 255.255.255.128 | 192.168.1.0 | 192.168.1.1 | 192.168.1.126 | 192.168.1.127 | 26 |
| Office | 50 | 62 | /26 | 255.255.255.192 | 192.168.1.128 | 192.168.1.129 | 192.168.1.190 | 192.168.1.191 | 12 |
| Servers | 20 | 30 | /27 | 255.255.255.224 | 192.168.1.192 | 192.168.1.193 | 192.168.1.222 | 192.168.1.223 | 10 |
| WAN link | 2 | 2 | /30 | 255.255.255.252 | 192.168.1.224 | 192.168.1.225 | 192.168.1.226 | 192.168.1.227 | 0 |
Variable Length Subnet Masking (VLSM) gives each network only the addresses it needs: a /25 for a 100-host LAN, a /30 for a router link, instead of one fixed size for everything. Enter the major network and the hosts each subnet needs, and this calculator allocates them in the standard largest-first order on aligned boundaries, then lists the network, mask, host range, broadcast address and spare addresses for each, plus how much of the block is left.
How to use this tool
- Enter the address block you have, such as 192.168.1.0/24.
- List each subnet as "name: hosts", one per line.
- Keep "largest first" for a gap-free plan (choose "as listed" to keep your order).
- Copy the table into your network documentation or router configuration.
Formula
block size = 2^⌈log₂(hosts + 2)⌉ · prefix = 32 − log₂(block size) · next network = previous network + previous block size
Two addresses per subnet go to the network and broadcast addresses, hence hosts + 2. Allocating the largest blocks first keeps every block aligned to its own size with no gaps; with RFC 3021 enabled, 2-host links get a /31.
Example
For 192.168.1.0/24 with A = 100, B = 50 and C = 20 hosts: A needs 102 addresses → a block of 128 (192.168.1.0/25); B needs 52 → 64 (192.168.1.128/26); C needs 22 → 32 (192.168.1.192/27). That uses 224 addresses and leaves 32 free from 192.168.1.224. Asking for 300 hosts in a /24 fails: a /24 holds only 254.
Frequently asked questions
Why allocate the largest subnet first?
A subnet must start on a multiple of its own size. Placing big blocks first means each following smaller block is automatically aligned, so no addresses are lost in gaps.
Should I leave room to grow?
Yes. Ask for more hosts than you have today (or keep the free space next to busy subnets) so they can grow without renumbering.
How is VLSM different from plain subnetting?
Plain subnetting cuts a network into equal parts. VLSM uses a different mask for each part, which wastes far fewer addresses when subnet sizes vary.
Last updated:
Page address with these inputs: https://kakao.mobile/tools/vlsm-calculator/
Cite or embed this tool
kakaoCalc. (2026, November 8). VLSM Calculator. https://kakao.mobile/tools/vlsm-calculator/
“VLSM Calculator.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/vlsm-calculator/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms