VLSM Calculator

Optimize your IPv4 address space by calculating Variable Length Subnet Masks. Allocate exactly the number of IPs you need for different departments without wasting addresses.

VLSM Calculator

Valid IPv4 required (e.g. 192.168.1.0)
Valid subnet mask required
/24
Enter comma-separated positive integers

Variable Length Subnetting

Subnet NameNetworkFirst Usable IPLast Usable IPBroadcastTotal Usable HostTotal Available HostNetmaskWildcard

Free/Unused IP Network

Subnet NameNetworkFirst Usable IPLast Usable IPBroadcastTotal Usable HostTotal Available HostNetmaskWildcard

How to Use the VLSM Calculator

Variable Length Subnet Masking (VLSM) allows you to divide a network into subnets of varying sizes. This prevents the wasting of IP addresses in smaller departments (like a point-to-point router link) while accommodating massive host counts in larger departments.

  1. Enter your Base Network: Provide your starting IP address (e.g., 192.168.1.0) and set the base Subnet Mask or CIDR prefix (e.g., /24).
  2. List your Host Requirements: In the Hosts per Subnet field, enter the exact number of usable IPs you need for each department, separated by commas (e.g., 100, 50).
  3. Calculate: Click "Calculate." The algorithm automatically sorts your requirements from largest to smallest to ensure the most mathematically efficient allocation of your IP blocks.
  4. Analyze Subnets & Free Space: The tool generates two tables. The first shows your allocated subnets with customized masks. The second shows the exact contiguous blocks of IPs left over for future expansion.

Example Calculation

You have the base network 192.168.1.0/24. Department A needs 100 hosts, and Department B needs 50 hosts. You input 100, 50.

Allocated Subnets
Subnet NameNetworkFirst Usable IPLast Usable IPBroadcastTotal Usable HostTotal Available HostNetmaskWildcard
Subnet 1192.168.1.0/25192.168.1.1192.168.1.126192.168.1.127126128255.255.255.1280.0.0.127
Subnet 2192.168.1.128/26192.168.1.129192.168.1.190192.168.1.1916264255.255.255.1920.0.0.63
Free/Unused IP Network
Subnet NameNetworkFirst Usable IPLast Usable IPBroadcastTotal Usable HostTotal Available HostNetmaskWildcard
Subnet 3192.168.1.192/26192.168.1.193192.168.1.254192.168.1.2556264255.255.255.1920.0.0.63

VLSM Frequently Asked Questions