IP Subnet Calculator for IPv4 & IPv6
Whether you're a network engineer planning a corporate infrastructure, a student studying for your networking certification, or a developer configuring cloud environments, understanding IP addressing and subnetting is a foundational skill. But manually calculating subnet details is tedious and error-prone.
The IP Subnet Calculator takes the complexity out of subnetting. Enter any IPv4 or IPv6 address in CIDR notation, and the tool instantly breaks it down into every address detail you need — network boundaries, usable host ranges, subnet masks, address types, and binary representations. No formulas, no guesswork, no mistakes. Just accurate results in seconds.
IPv4 Subnet Calculator
Enter IPv4 Address
IPv6 Subnet Calculator
Enter IPv6 Address
What Would You Get from This Tool?
Depending on whether you enter an IPv4 or IPv6 CIDR, the tool returns a comprehensive breakdown of the subnet.
For IPv4 addresses, you get:
- IP Address — The exact IP address you entered.
- Network Address — The base address of the subnet that identifies the network itself.
- Usable IP Range — The full range of IP addresses that can be assigned to hosts within the subnet.
- Broadcast Address — The special address used to send packets to every host on the subnet simultaneously.
- First Usable Host Address — The first IP in the range that can be assigned to a device.
- Last Usable Host Address — The last IP in the range that can be assigned to a device.
- Total Hosts — The total number of addresses in the subnet, including the network and broadcast addresses.
- Total Usable Hosts — The number of addresses actually available for devices (total hosts minus 2).
- Subnet Mask — The dotted-decimal mask that defines the boundary between the network and host portions of the address.
- Wildcard Mask — The inverse of the subnet mask, commonly used in ACLs and routing configurations.
- CIDR Notation — The address written in Classless Inter-Domain Routing format (e.g., 1.0.0.0/24).
- IP Class — The traditional class of the IP address (A, B, C, D, or E).
- IP Type — Whether the address is Public or Private.
- Binary Representations — The IP, network, mask, and broadcast addresses expressed in binary, making it easy to see how masking works at the bit level.
For IPv6 addresses, you get:
- IP Address — The full expanded IPv6 address.
- Network Address — The base address of the IPv6 subnet.
- Usable IP Range — The start and end of the address range within the subnet.
- First and Last Usable Host Address — The boundary addresses available for assignment within the subnet.
- Total Addresses — The enormous total count of addresses the subnet contains.
- CIDR Notation — The IPv6 address expressed in CIDR format.
- IP Type — The category of the IPv6 address (e.g., Global Unicast, Link-Local, Loopback).
Note that there is no broadcast address in IPv6 protocol; we return the full range within the prefix.
How to Use This Tool?
Using the IP Subnet Calculator is straightforward:
- Choose your IP version. The tool has two separate calculators — one for IPv4 and one for IPv6. Scroll to the one that matches your address.
- Enter your IP address. Type the IP address into the input field. For IPv4, it will look like 192.168.1.0. For IPv6, it will look like 2001:0db8:: or simply ::.
- Select your prefix length. Use the dropdown to choose the CIDR prefix (e.g., /24 for IPv4 or /64 for IPv6). The prefix length defines how many bits belong to the network portion of the address.
- Click Calculate. The tool will immediately display the full subnet breakdown.
- Review your results. All fields are displayed clearly. For IPv4, you'll also see binary representations at the bottom to help visualize how the subnet mask is applied.
Use Cases of This Tool
1. Network Planning and Design
When setting up a new office or data center network, administrators use subnetting to divide a large IP block into smaller segments for different departments, VLANs, or floors. This tool helps you quickly figure out how many hosts each subnet supports and what the network boundaries are.
2. Cloud and Server Configuration
When provisioning virtual machines or configuring cloud services (AWS VPCs, Azure VNets, etc.), you often need to define subnets manually. The calculator tells you the exact network address, broadcast address, and usable range you need to enter into those configuration panels.
3. Firewall and ACL Rule Writing
Wildcard masks are used in Cisco ACLs and firewall rules. Instead of calculating the wildcard mask by hand, you can enter your subnet here and get the wildcard mask immediately, ready to paste into your configuration.
4. Network Troubleshooting
If two hosts are failing to communicate, it might be because they're on different subnets. You can enter each host's IP and prefix to confirm whether they share the same network address — a common first diagnostic step.
5. Certification Study and Exam Preparation
Students preparing for CCNA, CompTIA Network+, or similar certifications frequently need to practice subnetting. This tool is a great way to check your work and visualize how the subnet mask divides the binary address.
6. IPv6 Transition and Deployment Planning
As networks shift to IPv6, engineers need to understand the structure of IPv6 subnets. The calculator breaks down IPv6 CIDRs and shows the full address range and type, making it a useful reference during IPv6 planning and migration.
7. Security Auditing
Security professionals use subnet information to define the scope of network scans or to confirm which IP ranges belong to a given network segment during a penetration test or audit.
Edge Cases
- Difference Between Total Hosts & Usable Hosts for IPv4 For most subnets in IPv4, usable hosts are exactly 2^(32 - prefix) - 2 (as the network and broadcast addresses are not usable). But, there are two special cases:
- 31-bit subnet masks (`/31`) for point-to-point links may treat both addresses as usable (RFC 3021).
- 32-bit subnet masks (`/32`) represents a single host.
- Broadcast Address in IPv6 Unlike unicast, multicast, and broadcast types of addresses in IPv4, IPv6 supports unicast, multicast, and anycast addresses. There is no broadcast address space in IPv6. Broadcast functionality in IPv6 is implemented using multicast addressing to groups of devices. A multicast group to which all nodes belong can be used for broadcasting in a network, which reduces network traffic compared to IPv4 broadcast storms.
- Wildcard Mask and Subnet Mask in IPv4 While the wildcard and subnet masks are really useful for ACLs and filters, but they are not same. For example, for a `/24` prefix length, the subnet mask is 255.255.255.0 and the wildcard mask in 0.0.0.255.
- IP Type IP Subnet Calculator detects all scopes and classes of IP addresses: public, private, loopback, link-local (as mentioned in RFC 1918 for IPv4), and IPv6 scopes (e.g., Unicast, Unique Local, Multicast, and Anycast).
FAQs
Go Beyond Subnets — Look Up What's Behind Any IP Address
Now that you know the network structure of an IP address, take it a step further. With the IP Geolocation API by APIFreaks, you can look up any IPv4 or IPv6 address and instantly retrieve its real-world location — including country, region, city, coordinates, postal code, and timezone. The API also supports security intelligence (VPN, proxy, and threat detection), ASN and ISP data, hostname lookup, and user-agent parsing, all in a single request.
Whether you're building a fraud detection system, personalizing content by region, analyzing traffic sources, or managing network infrastructure, the IP Geolocation API gives you accurate, actionable data at scale.
Start free with 10,000 credits — no credit card required.
Explore the IP Geolocation API