IPv4 Subnetting Calculator

This tool helps you understand and calculate IPv4 subnetting by dividing a network into smaller subnets.

Subnet Calculator
VLSM Calculator
Learn Subnetting

Step 1: Enter Network Information

Step 2: Choose Subnetting Method

Variable Length Subnet Mask (VLSM) Calculator

VLSM allows you to create subnets of different sizes from a parent network.

Required Subnets

Add the subnets you need, ordering from largest to smallest:

Subnetting Basics

What is Subnetting?

Subnetting is the process of dividing a large network into smaller, more manageable sub-networks or subnets. This helps to:

  • Improve network security by isolating network segments
  • Reduce network congestion
  • Optimize IP address allocation
  • Create separate broadcast domains

Types of Subnetting

Fixed-length Subnet Mask (FLSM): All subnets have the same mask/size

Variable-length Subnet Mask (VLSM): Subnets can have different masks/sizes

VLSM is more efficient for networks with varying host requirements.

Key Subnetting Terms

  • Network Address: First address in a subnet (All host bits are 0)
  • Broadcast Address: Last address in a subnet (All host bits are 1)
  • Usable Hosts: Addresses between network and broadcast
  • Subnet Mask: Divides network portion from host portion
  • CIDR Notation: /xx format showing network prefix length

Subnetting Process

  1. Identify Requirements: How many subnets/hosts are needed?
  2. Determine Subnet Bits: How many bits to borrow from host portion?
  3. Calculate Subnet Mask: Add subnet bits to original mask
  4. Calculate Subnets: Identify each subnet address
  5. Determine Address Ranges: For each subnet

Remember: Each subnet needs a network address and broadcast address. They cannot be assigned to hosts.

Subnetting Formulas

Calculation Formula Example (/24 → /26)
Number of Subnets 2(new prefix - old prefix) 2(26-24) = 22 = 4 subnets
Hosts Per Subnet 2(32 - new prefix) - 2 2(32-26) - 2 = 26 - 2 = 62 hosts
Subnet Size 2(32 - new prefix) 2(32-26) = 26 = 64 addresses
Subnet Increment 256 - (256 / 2(new prefix - old prefix)) 256 - (256 / 22) = 256 - 64 = 192

Subnet Mask Reference

CIDR Subnet Mask Hosts Common Use
/24255.255.255.0254Small network
/25255.255.255.128126Half a /24
/26255.255.255.19262Quarter of a /24
/27255.255.255.22430Small department
/28255.255.255.24014Small team
/29255.255.255.2486Few devices
/30255.255.255.2522Point-to-point link
/31255.255.255.2542*P2P (RFC 3021)
/32255.255.255.2551Single host

* /31 networks don't have network/broadcast addresses (RFC 3021)