SwiftCalculators Header
IT & Networking

IP Subnet Calculator

Calculate IPv4 and IPv6 subnets, network addresses, usable host ranges, and subnet masks instantly.

⚡ Real-time CIDR Updates 🔒 100% Private 📱 Mobile Friendly
🌐

Ready to Calculate

Enter your IP and mask details to see the network boundaries and host range.

Usable Hosts
0
ℹ️ IPv4 CIDR Configuration
Subnet Insight

This subnet provides 0 usable host addresses. Network and broadcast addresses cannot be assigned to hosts.

Network Prefix
::
ℹ️ IPv6 Configuration
Total Hosts
IP Class
CIDR Notation
Subnet Type
Network Details (IPv4)
ParameterValue
IP Address
Subnet Mask
Network Address
Usable Host Range
Broadcast Address
Wildcard Mask
Binary Subnet Mask
Network Details (IPv6)
ParameterValue
Full Uncompressed IP
Shortened IP
Network Prefix
Total /64 Subnets
Total Host Addresses

What is an IP Subnet Calculator?

An IP Subnet Calculator is an essential networking tool used to divide a larger IP network into smaller, more manageable sub-networks (subnets). It calculates routing prefixes, usable host ranges, network addresses, and broadcast addresses using Classless Inter-Domain Routing (CIDR) notation for both IPv4 and IPv6 networks.

The act of dividing a network is called subnetting, and routers serve as physical boundaries that allow traffic exchange between these distinct subnetworks. Subnetting improves network security, reduces broadcast congestion, and optimizes the assignment of IP addresses.

How to Use This Calculator

This calculator supports both the dominant IPv4 standard and the rapidly growing IPv6 standard. Simply follow these steps based on your IP version:

  1. Select your IP Version: Toggle between IPv4 and IPv6 using the buttons at the top of the calculator.
  2. Enter the IP Address: Input the host or network IP address.
  3. Select the Subnet Mask or Prefix: For IPv4, choose your desired subnet mask / CIDR notation (e.g., /24). For IPv6, choose the prefix length (e.g., /64).
  4. Calculate: The calculator instantly provides your network address, usable IP range, total available hosts, and complete binary breakdown.

The Formula / The Method

An IP address is comprised of a network number (routing prefix) and a host identifier. In IPv4, subnet masks differentiate these two elements. The mask acts as a bitwise filter. For example, a /24 network implies the first 24 bits represent the network, and the remaining 8 bits represent the hosts.

Total Hosts Formula: 2(32 - CIDR)
Usable Hosts Formula: 2(32 - CIDR) - 2

Note: The subtraction of 2 accounts for the reserved Network Address (all 0s in the host portion) and the Broadcast Address (all 1s in the host portion).

Frequently Asked Questions

A subnet mask is a 32-bit number (for IPv4) that masks an IP address and divides the IP address into a network address and a host address. It is typically expressed in dot-decimal notation, such as 255.255.255.0.

CIDR stands for Classless Inter-Domain Routing. It is a method for allocating IP addresses and IP routing. A CIDR notation looks like an IP address followed by a slash and a number (e.g., 192.168.1.0/24), where the number indicates how many bits are used for the network routing prefix.

Historically, IP addresses were divided into classes based on their leading bits. Class A networks supported millions of hosts, Class B supported 65,000, and Class C supported 254. While modern networking uses classless routing (CIDR), the legacy class definitions are still helpful for understanding network scale.

In any IPv4 subnet, the first address (where all host bits are 0) is reserved as the Network Address to identify the subnet itself. The last address (where all host bits are 1) is reserved as the Broadcast Address to send data to all hosts on that subnet. Neither can be assigned to a specific device.

IPv4 uses 32-bit addresses, allowing for about 4.3 billion unique addresses. Due to global address exhaustion, IPv6 was created using 128-bit addresses, which allows for 340 undecillion unique addresses. IPv6 also improves routing efficiency and eliminates the need for Network Address Translation (NAT).