IP Subnet Calculator Tool - CIDR VLSM IPv4 IPv6 Network Calculator

First Published:
Last Updated:

This tool calculates IPv4 and IPv6 subnet details from an IP address and CIDR prefix length. It provides network address, broadcast address, usable host range, subnet mask, wildcard mask, and a color-coded binary breakdown. The VLSM Planner allocates multiple subnets of different sizes within a network, optimizing address space usage for real-world network designs such as AWS VPC configurations.

All processing is performed entirely in your browser using client-side JavaScript. No data is transmitted to any server. Your IP addresses and network configurations never leave your device.

  • This tool is provided "AS IS" without any warranties of any kind.
  • The author accepts no responsibility for incorrect network configurations based on this tool's output.
  • Always verify subnet calculations independently before applying to production networks.
  • By using this tool, you accept full responsibility for any outcomes.

This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.

Quick examples:

Enter your network address and add subnets with the number of hosts needed. The planner will allocate subnets optimally (largest first) and show address space efficiency.

Subnet Requirements

Features

  • IPv4 Subnet Calculator - Calculate network address, broadcast address, usable host range, subnet mask, wildcard mask, total and usable host counts from any IPv4 address and CIDR prefix length.
  • Visual Binary Breakdown - Color-coded bit-level visualization showing the exact boundary between network bits and host bits for IP address, subnet mask, and network address.
  • Visual Subnet Map - Graphical representation of how the address space is divided into smaller subnets within the calculated network.
  • IPv6 Subnet Calculator - Full IPv6 subnet calculation using BigInt for 128-bit address arithmetic, with compressed and expanded address notation.
  • VLSM Planner - Variable Length Subnet Masking planner that accepts multiple subnet requirements (name and host count), allocates subnets optimally from largest to smallest, and displays address space efficiency with a visual allocation bar chart.
  • CIDR Quick Reference Table - Complete reference table for CIDR prefixes /8 through /32 with subnet mask, wildcard mask, address counts, and practical usage notes including AWS VPC subnet size recommendations.
  • IP Classification - Automatic detection of IP class (A/B/C/D/E) and private address ranges (RFC 1918) for the input address.
  • AWS VPC Quick Presets - One-click presets for common AWS VPC and subnet sizes (/16 VPC, /24 LAN, /28 minimum AWS subnet).
  • Complete Client-Side Processing - All calculations run entirely in your browser. No data is transmitted to any server, making it safe for use with production network addresses.

How to Use

  1. IPv4 Subnet Calculator: Enter an IPv4 address (e.g., 192.168.1.0) and select a CIDR prefix length, or enter CIDR notation directly (e.g., 10.0.0.0/16). Click "Calculate" to see the full subnet breakdown, binary visualization, and reference table.
  2. IPv6 Subnet Calculator: Switch to the "IPv6 Subnet" tab, enter an IPv6 address (e.g., 2001:db8::1), select a prefix length, and click "Calculate" to see network details and common prefix reference.
  3. VLSM Planner: Switch to the "VLSM Planner" tab, enter a network address and prefix. Add subnet requirements by specifying a name and required host count for each. Click "Calculate VLSM" to see the optimal allocation with efficiency metrics and a visual address space map.
  4. Use the "Copy Result" button to copy calculation results to your clipboard for documentation or configuration use.

Important Notes

  • IPv4 calculations use unsigned 32-bit integer arithmetic with JavaScript bitwise operators for accuracy.
  • IPv6 calculations use JavaScript BigInt for full 128-bit precision.
  • The VLSM planner allocates subnets from largest to smallest for optimal space efficiency, following standard VLSM best practices.
  • For /31 and /32 prefixes, special handling applies per RFC 3021 (point-to-point links) and host routes.
  • AWS VPC supports CIDR blocks from /16 (65,536 addresses) to /28 (16 addresses). AWS reserves 5 IP addresses in each subnet (first four and last one).
  • This tool complements the IP Range to CIDR Converter Tool for comprehensive network address planning.

References:
Tech Blog with curated related content
Web Tools Collection

Written by Hidekazu Konishi