IP / Subnet Calculator
Full IPv4/IPv6 networking toolkit: subnet calculator, address info, VLSM planner, and range-to-CIDR converter.
About This Tool
A comprehensive IP networking toolkit covering everything you need for IPv4 and IPv6 address planning. Four specialized calculators in one tool: subnet calculator, address info, VLSM planner, and range-to-CIDR converter.
Features
Full IPv4 and IPv6 — subnet calculation with BigInt math for 128-bit addresses
Auto-detect — automatically identifies IPv4 vs IPv6 from your input
Smart CIDR parsing — paste 192.168.1.0/24 and it auto-splits the prefix
Address type detection — Private (RFC 1918), CGNAT, Loopback, Link-Local, Multicast, Documentation, ULA, Teredo, 6to4, and more
Address converter — binary, hex, integer, reverse DNS (PTR), IPv4-mapped IPv6, 6to4
VLSM planner — allocate subnets of different sizes with waste calculation
Range to CIDR — convert arbitrary IP ranges to optimal CIDR blocks
Bit boundary visualization — colored network/host bit display
Common presets — quick access to typical IPv4 and IPv6 prefix lengths
Share link — URL parameters for bookmarking and sharing
Copy results — one-click copy of all calculated values
How to Use
Subnet Calculator
Enter an IPv4 address (e.g.,
192.168.1.0) or IPv6 address (e.g.,2001:db8::)- Set the CIDR prefix length or click a preset button
View network address, broadcast, mask, wildcard, host range, address type, and more
Scroll down to see the bit boundary visualization showing network vs host bits
Address Info
Enter any IP address, integer, or hex value (e.g.,
3232235777= 192.168.1.1)View all representations: binary, hex, integer, reverse DNS, IPv4-mapped IPv6, and 6to4
- Identify address type, class, and scope
VLSM Planner
- Enter a base IPv4 network (e.g.,
10.0.0.0/16) - Add subnet requirements with names and required host counts
Click Calculate to see optimal allocation sorted by size, with waste analysis
Range to CIDR
Enter start and end IPv4 addresses (e.g.,
192.168.1.0to192.168.3.255)- View the minimal set of CIDR blocks covering the range
IPv4 Subnet Reference
Common Subnet Sizes
| CIDR | Subnet Mask | Addresses | Usable Hosts | Typical Use |
|---|---|---|---|---|
/32 | 255.255.255.255 | 1 | 1 | Host route |
/31 | 255.255.255.254 | 2 | 2 | Point-to-point link (RFC 3021) |
/30 | 255.255.255.252 | 4 | 2 | Point-to-point link |
/29 | 255.255.255.248 | 8 | 6 | Small office |
/28 | 255.255.255.240 | 16 | 14 | Small network |
/27 | 255.255.255.224 | 32 | 30 | Department |
/26 | 255.255.255.192 | 64 | 62 | Floor / building |
/25 | 255.255.255.128 | 128 | 126 | Large department |
/24 | 255.255.255.0 | 256 | 254 | Standard LAN |
/16 | 255.255.0.0 | 65,536 | 65,534 | Large site |
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 | ISP / Class A |
IPv4 Classes
| Class | Range | Default Mask | Networks | Purpose |
|---|---|---|---|---|
| A | 1.0.0.0 – 126.255.255.255 | /8 | 126 | Large organizations |
| B | 128.0.0.0 – 191.255.255.255 | /16 | 16,384 | Medium organizations |
| C | 192.0.0.0 – 223.255.255.255 | /24 | 2,097,152 | Small organizations |
| D | 224.0.0.0 – 239.255.255.255 | N/A | N/A | Multicast |
| E | 240.0.0.0 – 255.255.255.255 | N/A | N/A | Reserved / Experimental |
Private and Reserved Ranges
| Range | CIDR | Purpose | RFC |
|---|---|---|---|
10.0.0.0 | /8 | Private network | RFC 1918 |
172.16.0.0 | /12 | Private network | RFC 1918 |
192.168.0.0 | /16 | Private network | RFC 1918 |
100.64.0.0 | /10 | CGNAT / Shared | RFC 6598 |
127.0.0.0 | /8 | Loopback | RFC 1122 |
169.254.0.0 | /16 | Link-Local / APIPA | RFC 3927 |
192.0.2.0 | /24 | Documentation (TEST-NET-1) | RFC 5737 |
198.51.100.0 | /24 | Documentation (TEST-NET-2) | RFC 5737 |
203.0.113.0 | /24 | Documentation (TEST-NET-3) | RFC 5737 |
224.0.0.0 | /4 | Multicast | RFC 5771 |
IPv6 Reference
Common Prefix Lengths
| Prefix | Addresses | Typical Use |
|---|---|---|
/128 | 1 | Host address |
/127 | 2 | Point-to-point link (RFC 6164) |
/64 | 264 | Standard subnet (SLAAC required) |
/56 | 272 | Residential site (256 /64s) |
/48 | 280 | Enterprise site (65,536 /64s) |
/32 | 296 | ISP allocation |
IPv6 Special Addresses
| Address / Prefix | Purpose | RFC |
|---|---|---|
::/128 | Unspecified | RFC 4291 |
::1/128 | Loopback | RFC 4291 |
::ffff:0:0/96 | IPv4-Mapped IPv6 | RFC 4291 |
64:ff9b::/96 | NAT64 translation | RFC 6052 |
2001:db8::/32 | Documentation | RFC 3849 |
2002::/16 | 6to4 tunneling | RFC 3056 |
fc00::/7 | Unique Local Address (ULA) | RFC 4193 |
fe80::/10 | Link-Local | RFC 4291 |
ff00::/8 | Multicast | RFC 4291 |
Linux Command Reference
Show IP addresses
Show IPv6 addresses
Routing table
Calculate subnet with ipcalc
Reverse DNS lookup
Scan a subnet
VLSM Explanation
Variable Length Subnet Masking (VLSM) allows dividing a network into subnets of different sizes, minimizing wasted addresses. The algorithm:
- Sort requirements by host count (largest first)
For each requirement, find the smallest power-of-2 block that fits (hosts + 2 for network/broadcast addresses)
- Align the block to its natural boundary
- Allocate and advance to the next available space
In IPv6, VLSM is less relevant because /64 is the standard prefix for all subnets (required for SLAAC). The immense address space makes variable sizing unnecessary.
Range to CIDR Algorithm
Converting an arbitrary IP range to CIDR blocks finds the minimal set of prefixes that exactly cover the range. For each position:
- Find the largest aligned block starting at the current address
- Ensure the block does not extend beyond the end of the range
- Record the block and advance past it
This is useful for firewall rules, route aggregation, and access control lists where CIDR notation is required.
Privacy
All calculations run entirely in your browser. No IP addresses or network data are sent to any server. The tool works offline after initial page load.