IP Subnet Calculator

Enter an IPv4 address and either CIDR notation (e.g., /24) or subnet mask (e.g., 255.255.255.0)

IP Address

Subnet Information

Enter value between 0-32
Enter subnet mask
Enter an IPv6 address and prefix length (e.g., 2001:db8::1 with prefix /64)

IPv6 Address

Prefix Length

Enter value between 0-128
Enter a CIDR value to see subnet mask, host count, and network information

CIDR Notation

Enter value between 0-32

About IP Subnet Calculator

The IP Subnet Calculator is a comprehensive networking tool designed for network administrators, IT professionals, students, and anyone working with IP networks. Calculate IPv4 and IPv6 subnets, CIDR notation, subnet masks, network addresses, broadcast addresses, and host ranges quickly and accurately.

What is IP Subnetting?

IP subnetting is the process of dividing a network into smaller sub-networks (subnets). This allows for better network organization, improved security, reduced network congestion, and more efficient use of IP address space. Subnetting uses subnet masks to determine which portion of an IP address represents the network and which represents the host.

Understanding IPv4 Addresses

An IPv4 address is a 32-bit number typically written in dotted-decimal notation (e.g., 192.168.1.1). It consists of four octets, each ranging from 0 to 255. The address is divided into network and host portions based on the subnet mask.

IPv4 Address Classes:

Class First Octet Range Default Subnet Mask CIDR Networks Hosts per Network
Class A 1 - 127 255.0.0.0 /8 126 16,777,214
Class B 128 - 191 255.255.0.0 /16 16,384 65,534
Class C 192 - 223 255.255.255.0 /24 2,097,152 254
Class D 224 - 239 N/A (Multicast) N/A Reserved for multicast
Class E 240 - 255 N/A (Experimental) N/A Reserved for research

Understanding Subnet Masks

A subnet mask is a 32-bit number that masks an IP address and divides it into network and host portions. The subnet mask determines how many bits are used for the network ID and how many are available for host IDs.

Common Subnet Masks:

CIDR Subnet Mask Wildcard Mask Total Hosts Usable Hosts
/8 255.0.0.0 0.255.255.255 16,777,216 16,777,214
/16 255.255.0.0 0.0.255.255 65,536 65,534
/24 255.255.255.0 0.0.0.255 256 254
/25 255.255.255.128 0.0.0.127 128 126
/26 255.255.255.192 0.0.0.63 64 62
/27 255.255.255.224 0.0.0.31 32 30
/28 255.255.255.240 0.0.0.15 16 14
/29 255.255.255.248 0.0.0.7 8 6
/30 255.255.255.252 0.0.0.3 4 2
/31 255.255.255.254 0.0.0.1 2 2 (Point-to-Point)
/32 255.255.255.255 0.0.0.0 1 1 (Host route)

Understanding CIDR Notation

CIDR (Classless Inter-Domain Routing) notation is a compact way to specify IP addresses and their associated network masks. It's written as an IP address followed by a slash and the number of network bits (e.g., 192.168.1.0/24).

Example: 192.168.1.0/24

192.168.1.0 = Network address
/24 = 24 bits for network (leaving 8 bits for hosts)
Subnet Mask = 255.255.255.0
Total Hosts = 2^8 = 256
Usable Hosts = 256 - 2 = 254 (excluding network and broadcast)

Key Subnet Terms

Network Address:

The first address in a subnet, used to identify the network itself. All host bits are set to 0. This address cannot be assigned to a host.

Broadcast Address:

The last address in a subnet, used to send data to all hosts on the network. All host bits are set to 1. This address cannot be assigned to a host.

First Usable Host:

The first IP address that can be assigned to a device, which is the network address + 1.

Last Usable Host:

The last IP address that can be assigned to a device, which is the broadcast address - 1.

Wildcard Mask:

The inverse of the subnet mask, used in some networking equipment (like Cisco routers) for access control lists (ACLs). Calculate by subtracting each octet of the subnet mask from 255.

Private IP Address Ranges

Private IP addresses are reserved for use within private networks and are not routable on the public internet. These ranges are defined in RFC 1918:

Class Private IP Range CIDR Notation Subnet Mask
Class A 10.0.0.0 - 10.255.255.255 10.0.0.0/8 255.0.0.0
Class B 172.16.0.0 - 172.31.255.255 172.16.0.0/12 255.240.0.0
Class C 192.168.0.0 - 192.168.255.255 192.168.0.0/16 255.255.0.0

Other Reserved IP Ranges:

  • 127.0.0.0/8: Loopback addresses (localhost)
  • 169.254.0.0/16: Link-local addresses (APIPA)
  • 224.0.0.0/4: Multicast addresses
  • 0.0.0.0/8: Current network
  • 255.255.255.255/32: Broadcast address

IPv6 Subnetting

IPv6 uses 128-bit addresses, providing an enormous address space. IPv6 addresses are written in hexadecimal and separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).

IPv6 Address Structure:

  • 128 bits total (16 bytes)
  • Written as 8 groups of 4 hexadecimal digits
  • Can be compressed by removing leading zeros and consecutive zero groups (::)
  • Prefix notation similar to IPv4 CIDR (e.g., /64)

Common IPv6 Prefix Lengths:

Prefix Purpose Typical Use
/48 Site prefix Assigned to organizations
/56 Residential site Home networks
/64 Subnet prefix Standard subnet size
/128 Single address Individual host

Subnetting Examples

Example 1: Small Office Network

Requirement: 50 hosts
IP Address: 192.168.1.0/24

Solution: Divide /24 into /26 subnets
- /26 provides 64 addresses (62 usable hosts)
- Subnet mask: 255.255.255.192
- Creates 4 subnets:
  1. 192.168.1.0/26 (hosts: 192.168.1.1 - 192.168.1.62)
  2. 192.168.1.64/26 (hosts: 192.168.1.65 - 192.168.1.126)
  3. 192.168.1.128/26 (hosts: 192.168.1.129 - 192.168.1.190)
  4. 192.168.1.192/26 (hosts: 192.168.1.193 - 192.168.1.254)

Example 2: Point-to-Point Link

Requirement: Connect two routers
IP Address: 10.0.0.0/30

Solution:
- /30 provides 4 addresses (2 usable hosts)
- Subnet mask: 255.255.255.252
- Network: 10.0.0.0
- Router 1: 10.0.0.1
- Router 2: 10.0.0.2
- Broadcast: 10.0.0.3

Privacy and Data Security

All Subnet calculations are performed entirely in your web browser using JavaScript. We do not collect, store, transmit, or have access to any of your information, personal data, or academic records. Your Subnet and all calculations remain completely private and secure on your device.

Mobile and Cross-Platform Access

Our Subnet page is fully responsive and works seamlessly on all devices including smartphones, tablets, laptops, and desktop computers. Get subnet informations anywhere - at school, home, or on the go. The interface automatically adapts to your screen size for optimal usability.