Subnet Calculator

Divide an IP network into subnets by specifying the number of subnets or required hosts per subnet. Supports VLSM (Variable Length Subnet Masking).

Input data is processed in your browser
Data is never sent to a server

Tool

What is the Subnet Calculator?

A tool for dividing an IP network into multiple subnets to meet your design requirements.
It streamlines network design, VLAN planning, and router configuration tasks.

Three Division Modes

  • By Subnet Count — Divides into equal-sized subnets. Ideal for per-VLAN or per-department segmentation.
  • By Hosts/Subnet — Automatically selects the optimal subnet mask for the required host count. Minimizes address waste.
  • VLSM (Variable) — Specify different host counts for each subnet. The most flexible addressing scheme.

Address Space Map

A visual bar below the results shows the relative sizes of each subnet. Particularly useful in VLSM mode to see how address space is allocated at a glance.

How to Use

  1. Enter the parent network in CIDR notation (e.g. 192.168.0.0/24).
  2. Choose a division mode — "By Subnet Count", "By Hosts/Subnet", or "VLSM (Variable)".
  3. Enter the required value for the selected mode and click "Calculate".
  4. Review the subnet table showing network address, subnet mask, host range, and usable host count.
  5. Use the copy buttons to copy individual rows or all results to the clipboard.

FAQ

What is subnetting?

Subnetting is the process of dividing a larger IP network into multiple smaller subnetworks. For example, splitting 192.168.0.0/24 into four /26 subnets creates four independent networks, each able to accommodate 62 hosts.

What is VLSM?

VLSM (Variable Length Subnet Masking) allows different subnet mask lengths to be used within the same network, so each subnet can be sized to exactly meet its host requirements. This minimizes wasted address space.

How does "By Subnet Count" division work?

The tool finds the smallest power of 2 that is greater than or equal to the requested number of subnets, then adds the required subnet bits to the parent prefix. For example, dividing a /24 into 4 subnets adds 2 bits, resulting in /26.

How does "By Hosts/Subnet" division work?

The tool calculates the minimum subnet size that can hold the specified number of hosts (plus 2 for the network and broadcast addresses), then lists as many subnets as fit within the parent network.

What is the maximum supported prefix length?

The tool supports subnet division up to /30. Prefixes /31 and /32 are excluded as they are reserved for point-to-point links and single-host routes respectively.