This comprehensive IP subnet calculator calculates network information for both IPv4 and IPv6 networks. Enter an IP address and CIDR prefix to calculate subnet details, including network address, usable range, and more.
IPv4 Subnet Calculator
Enter an IPv4 address and either CIDR prefix or subnet mask to calculate subnet details.
Please enter valid IPv4 address and CIDR or subnet mask.
IPv4 Subnet Results:
Click "Calculate IPv4 Subnet" to see the results
IP Address:-
CIDR Notation:-
Subnet Mask:-
Wildcard Mask:-
Network Address:-
Broadcast Address:-
First Usable IP:-
Last Usable IP:-
Total Hosts:-
Usable Hosts:-
IP Class:-
Binary Representation:
IP Address:
Subnet Mask:
Network Address:
IPv6 Subnet Calculator
Enter an IPv6 address and CIDR prefix to calculate subnet details. IPv6 addresses can be entered in full or compressed format.
Please enter valid IPv6 address and CIDR prefix (1-128).
IP subnetting is the process of dividing a larger IP network into smaller, more manageable subnetworks (subnets). This technique helps to:
Reduce network congestion by limiting broadcast traffic to smaller segments
Improve network security by isolating different departments or functions
Optimize IP address allocation and reduce waste
Simplify network management and troubleshooting
Subnetting is achieved by borrowing bits from the host portion of an IP address to create a subnet portion. The subnet mask determines which portion of the IP address represents the network and which portion represents the host.
Configuration: Auto-configuration (SLAAC) or DHCPv6
IPv6 Address Types
Global Unicast Addresses (2000::/3)
Public addresses routable on the internet: 2001:0db8:85a3::8a2e:0370:7334
Unique Local Addresses (fc00::/7)
Private addresses for local networks: fd00::/8
Link-Local Addresses (fe80::/10)
Addresses for communication on a single link: fe80::1
Multicast Addresses (ff00::/8)
Addresses for sending to multiple devices: ff02::1 (all nodes)
Special Addresses
::1 - Loopback address (like 127.0.0.1 in IPv4)
:: - Unspecified address
::ffff:0:0/96 - IPv4-mapped IPv6 addresses
CIDR Notation
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent an IP address and its associated routing prefix. It's written as an IP address followed by a slash and the number of bits in the prefix.
Example: 192.168.1.0/24
In this example:
192.168.1.0 is the network address
/24 indicates that the first 24 bits are the network portion (subnet mask: 255.255.255.0)
The remaining 8 bits (32-24) are available for host addresses
A subnet mask is a 32-bit number that masks an IP address and divides it into network and host portions. The network bits are represented by 1's and host bits by 0's.
Example for /24 (255.255.255.0):
Binary: 11111111.11111111.11111111.00000000
Decimal: 255 . 255 . 255 . 0
To calculate the number of hosts in a subnet:
Total Hosts = 2(32 - CIDR) Usable Hosts = 2(32 - CIDR) - 2
(Subtract 2 for network and broadcast addresses)
Traditional IP addressing uses classes to determine the default subnet mask:
Class A: 1.0.0.0 to 126.255.255.255 (Default mask: 255.0.0.0 or /8) Class B: 128.0.0.0 to 191.255.255.255 (Default mask: 255.255.0.0 or /16) Class C: 192.0.0.0 to 223.255.255.255 (Default mask: 255.255.255.0 or /24) Class D: 224.0.0.0 to 239.255.255.255 (Multicast) Class E: 240.0.0.0 to 255.255.255.255 (Reserved)
Note: With CIDR (classless addressing), these class boundaries are less relevant as you can use any mask with any network.
IPv6 Subnetting Examples
🌐 Standard /64 Subnet
Most common IPv6 subnet size for local networks:
Network: 2001:0db8:85a3:0000::/64
Usable Range: 2001:0db8:85a3:0000::1 - 2001:0db8:85a3:0000:ffff:ffff:ffff:fffe
Total Addresses: 18,446,744,073,709,551,616
Typical Use: Home networks, small businesses
🏢 Enterprise /48 Allocation
Typical allocation for an organization:
Allocation: 2001:0db8:1234::/48
Subnets Available: 65,536 /64 subnets
Each /64 subnet: 18 quintillion addresses
Typical Use: Large corporations, universities
🔗 Point-to-Point /127
For router-to-router connections:
Network: fe80::/127
Usable Addresses: 2
Addresses: fe80:: and fe80::1
Typical Use: Router links, WAN connections