IPv4/IPv6 Subnet Calculator
Calculate IPv4 and IPv6 network boundaries, address ranges, and subnet sizes.
Results
Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Usable Host Range
192.168.1.1 - 192.168.1.254
Total Usable Hosts
254
Subnet Mask
255.255.255.0
Binary Subnet Mask
11111111.11111111.11111111.00000000
Interactive Bit-Level Visualizer
Click any bit to flip it and instantly update the IP address. Network bits are indigo, host bits are pink.
How to use this tool
Enter the IP address
Type an IPv4 address such as 192.168.1.1 or an IPv6 address such as 2001:db8::1. IPv4 octets must use canonical decimal notation without leading zeros, while IPv6 also accepts IPv4-mapped dotted tails such as ::ffff:192.0.2.128.
Set the CIDR prefix
Enter the prefix length after a slash, like /24 for IPv4 or /64 for IPv6. The prefix defines how many bits belong to the network versus the host.
Read the subnet boundaries
For IPv4, the calculator shows the network address, broadcast address, and usable host range. For IPv6, it shows the first and last addresses in the range because IPv6 uses multicast instead of broadcast.
Check the usable host count
For IPv4, the usual host count excludes the network and broadcast addresses, so a /24 gives 254 usable hosts. For IPv6, the calculator reports the full address count of 2 raised to the number of host bits, so a /126 contains 4 addresses.
About this tool
The Subnet Calculator is an essential tool for network engineers, sysadmins, and IT students. It takes any IPv4 or IPv6 address and a CIDR prefix (like /24 or /64) and instantly calculates the exact boundaries of that network segment.
Whether you are setting up a home lab, configuring AWS VPCs, or studying for the CCNA, this tool provides IPv4 network and broadcast details plus IPv6 address boundaries without making you do binary bit shifting by hand.
How it works
The calculator converts an IP address into its raw binary representation. A bitwise AND with the subnet mask finds the first address, while setting every host bit finds the last address. In IPv4 that last value is the broadcast address. IPv6 has no broadcast address, so it is shown only as the end of the address range.
IPv6 Support
IPv6 subnetting works on the exact same mathematical principles as IPv4, but uses 128-bit addresses instead of 32-bit. Because the numbers are astronomically large, this calculator uses native BigInt math to compute IPv6 network boundaries and host counts up to /128.
Popular subnet scenarios
Pre-computed host counts and use cases for common CIDR notations.
Networking comparisons
Protocol head-to-heads that explain the addressing concepts this calculator works with, such as IPv4 vs IPv6.
Frequently asked questions
What is a Subnet Mask or CIDR?
How many usable IP addresses are in a /24 subnet?
What is the difference between IPv4 and IPv6?
What is a broadcast address?
Related tools
RAID Calculator
Calculate usable capacity and fault tolerance for RAID 0, 1, 5, 6, and 10.
Use tool ➜Data Transfer Calculator
Estimate transfer times for files over USB, WiFi, Ethernet, and more.
Use tool ➜Display Bandwidth Calculator
Check display bandwidth for HDMI, DisplayPort, USB-C, Thunderbolt, and USB4.
Use tool ➜JSON Formatter
Validate, format, and minify JSON data with readable output and error detection.
Use tool ➜Use this tool on your own site
Drop the Subnet Calculator into your blog, docs, or CMS with one iframe snippet. Free, no signup. See all embeddable tools
