DNS RobotDNS Propagation Checker
HomeDNS LookupWHOIS LookupIP LookupSSL Check
DNS RobotDNS Propagation Checker

Next-generation DNS propagation toolkit

Privacy PolicyTerms of ServiceAbout UsContact

DNS Tools

DNS LookupDomain to IPNS LookupMX LookupCNAME LookupView all

Email Tools

SPF Record CheckerDMARC CheckerDKIM CheckerSMTP Test ToolEmail Header AnalyzerView all

Website Tools

WHOIS LookupDomain AvailabilitySubdomain FinderCMS DetectorLink AnalyzerView all

Network Tools

Ping ToolTraceroutePort CheckerHTTP Headers CheckSSL Certificate CheckView all

IP Tools

IP LookupWhat Is My IPIP Blacklist CheckIP to HostnameASN LookupView all

Utility Tools

QR Code ScannerQR Code GeneratorMorse Code TranslatorText to Binary ConverterSmall Text GeneratorView all
© 2026 DNS Robot. Developed by ❤ Shaik Brothers
All systems operational
Made with
Home/IP Tools/Subnet Calculator

Subnet Calculator

Free CIDR subnet calculator for IPv4 and IPv6. Calculate network address, broadcast address, subnet mask, wildcard mask, usable hosts, and total addresses from any CIDR notation. Includes IPv6 prefix calculation, address type detection, and scope identification. Essential for network planning, IP allocation, and subnetting.

Free Subnet ToolSubnet CalculatorCIDR NotationIPv4 & IPv6

What Is a Subnet Calculator?

A subnet calculator is a tool that computes all subnetting details from an IP address and CIDR prefix length. This tool supports both IPv4 (like 192.168.1.0/24) and IPv6 (like 2001:db8::/48). For IPv4, get the network address, broadcast address, subnet mask, wildcard mask, first and last usable hosts, total addresses, and usable host count. For IPv6, get the expanded and compressed address forms, network prefix, first and last addresses, total addresses, address type, and scope.

Whether you're a network engineer designing enterprise architectures, a system administrator configuring servers, or a student learning subnetting, this free IP subnet calculator eliminates manual binary math and gives you accurate results instantly. Use it as a subnet mask calculator to convert between CIDR and dotted-decimal notation, or as a visual subnet calculator to plan your network layout. All calculations happen in your browser — no data is sent to any server.

DNS Robot subnet calculator showing CIDR notation input field with calculated network address, broadcast address, subnet mask, and usable host range
The DNS Robot subnet calculator instantly computes all network details from CIDR notation input.

How CIDR Notation Works

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated network prefix in the format IP/prefix. For IPv4, the prefix ranges from 0–32 (out of 32 bits). For IPv6, it ranges from 0–128 (out of 128 bits). The prefix indicates how many bits belong to the network portion — the remaining bits identify individual hosts or interface identifiers within that network.

1

IP Address Input

Enter an IPv4 (e.g., 10.0.0.0/16) or IPv6 (e.g., 2001:db8::/32) address

2

Binary Masking

The prefix defines which bits are network (1s) and host (0s)

3

AND Operation

IP AND prefix mask yields the network address

4

Results

Network, range, usable hosts, address type — all calculated

Subnet Mask to CIDR Conversion Chart

Use this subnet mask chart for quick reference when converting between subnet mask and CIDR notation. The chart shows common prefix lengths with their corresponding subnet masks, wildcard masks, and usable host counts — an essential reference for netmask CIDR conversion.

CIDRSubnet MaskWildcardUsable Hosts
/8255.0.0.00.255.255.25516,777,214
/12255.240.0.00.15.255.2551,048,574
/16255.255.0.00.0.255.25565,534
/20255.255.240.00.0.15.2554,094
/24255.255.255.00.0.0.255254
/25255.255.255.1280.0.0.127126
/26255.255.255.1920.0.0.6362
/27255.255.255.2240.0.0.3130
/28255.255.255.2400.0.0.1514
/29255.255.255.2480.0.0.76
/30255.255.255.2520.0.0.32
/31255.255.255.2540.0.0.12 (P2P)
/32255.255.255.2550.0.0.01 (host)
Visual guide showing how CIDR notation divides IPv4 and IPv6 addresses into network and host portions with binary mask representation
CIDR notation divides the IP address into network bits and host bits for flexible subnetting — 32 bits for IPv4, 128 bits for IPv6.

IPv6 CIDR Prefix Reference

IPv6 uses 128-bit addresses, providing a vastly larger address space than IPv4. The IPv6 subnet calculator handles prefix lengths from /8 to /128. Here are the most common IPv6 prefix lengths used in real-world network planning and ISP allocations.

PrefixTypical UseAddresses
/32ISP allocation (single organization)2⁹⁶ ≈ 79.2 sextillion
/48Site allocation (one customer site)2⁸⁰ ≈ 1.2 septillion
/56Residential assignment (multi-subnet home)2⁷² ≈ 4.7 sextillion
/64Single subnet (standard LAN segment)2⁶⁴ ≈ 18.4 quintillion
/112Point-to-point link (IPv4-like sizing)65,536
/126Point-to-point link (4 addresses)4
/127Point-to-point link (RFC 6164)2
/128Single host (loopback, host route)1

Unlike IPv4, IPv6 does not use broadcast addresses — it uses multicast and anycast instead. The standard subnet size for LANs is /64, which provides 2⁶⁴ addresses for Stateless Address Autoconfiguration (SLAAC). Our IPv6 calculator also detects the address type (Global Unicast, Link-Local, Unique Local, Multicast, Loopback, or IPv4-Mapped).

Understanding Subnet Calculation Results

When you enter an IP address in CIDR notation into the subnet calculator, it computes several key fields. Understanding each field is essential for proper network configuration and troubleshooting.

Network Address

The first address in the subnet, identifying the network itself. Obtained by performing a bitwise AND between the IP and subnet mask. Cannot be assigned to any host.

Broadcast Address

The last address in the subnet, used to send packets to all hosts simultaneously. Calculated by setting all host bits to 1. Also cannot be assigned to hosts.

Subnet Mask

A 32-bit mask with 1s for network bits and 0s for host bits (e.g., 255.255.255.0). Used by devices to determine if a destination IP is on the same subnet or needs routing.

Wildcard Mask

The bitwise inverse of the subnet mask (e.g., 0.0.0.255). Used in Cisco ACLs and OSPF configurations to match ranges of IP addresses in access control and routing rules.

First & Last Usable Host

The range of IP addresses that can be assigned to devices. First usable = network address + 1, last usable = broadcast address - 1. For /31 links, both addresses are usable (RFC 3021).

Total & Usable Hosts

Total addresses = 2^(32-prefix). Usable hosts = total - 2 (minus network and broadcast). Knowing usable count ensures you don't over-allocate or under-provision subnets.

Private IP Address Ranges (RFC 1918)

RFC 1918 defines three blocks of private IPv4 addresses that are not routable on the public internet. These are used for internal networks behind NAT (Network Address Translation). Our subnet calculator automatically detects whether the entered IP falls within a private or public range.

10.0.0.0/8
Class A Private
Start: 10.0.0.0
End: 10.255.255.255
Addresses: 16,777,216
Typical use: Large enterprises, data centers
172.16.0.0/12
Class B Private
Start: 172.16.0.0
End: 172.31.255.255
Addresses: 1,048,576
Typical use: Cloud VPCs, medium networks
192.168.0.0/16
Class C Private
Start: 192.168.0.0
End: 192.168.255.255
Addresses: 65,536
Typical use: Home/small office LANs

Who Uses a Subnet Calculator?

Subnet calculators are essential tools for anyone working with IP networks. From enterprise network architects to home lab enthusiasts, understanding subnetting is a fundamental networking skill.

Network Engineers

Design subnetting schemes for enterprise networks, configure OSPF areas, plan VLAN-to-subnet mappings, and optimize IP address utilization across sites.

Security Professionals

Configure firewall rules with precise CIDR ranges, segment sensitive systems into isolated subnets, and implement zero-trust network architectures.

System Administrators

Set up server networks, configure DHCP scopes, plan cloud VPC subnets (AWS, Azure, GCP), and troubleshoot connectivity issues between subnets.

Cloud Architects

Design VPC architectures with properly sized subnets across availability zones, plan CIDR blocks for VPC peering, and avoid IP range overlaps.

Home Lab Users

Set up home networks with separate subnets for IoT devices, media servers, and workstations. Calculate the right subnet size for each network segment.

Students & Certification Prep

Practice subnetting for CCNA, CompTIA Network+, and other networking certifications. Verify manual calculations and build subnetting intuition.

Infographic showing subnet calculator use cases including network design, cloud VPC planning, security segmentation, and CCNA certification preparation
Subnet calculators are used across network engineering, cloud architecture, security, and certification preparation.

Subnetting Best Practices

Proper subnetting is crucial for efficient network design. Follow these best practices to avoid common mistakes and plan your IP addressing effectively.

Do

  • Plan for 20–30% growth when sizing subnets
  • Use /30 or /31 for point-to-point router links
  • Align subnets to power-of-2 boundaries for clean summarization
  • Document every subnet allocation in an IPAM system
  • Separate management, user, and server traffic into distinct subnets

Don't

  • Allocate a /24 when a /27 would suffice — wastes 224 addresses
  • Use overlapping CIDR blocks between VPN-connected sites
  • Assign network or broadcast addresses to hosts
  • Mix private and public IPs in the same subnet
  • Forget to account for gateway, HSRP/VRRP, and DHCP server IPs

Related Network & IP Tools

Explore more free network and IP tools on DNS Robot to complement your subnetting work.

IP Lookup
Look up geolocation, ISP, and ASN details for any IP address
IPv4 to IPv6 Converter
Convert IPv4 addresses to IPv6-mapped format
IPv6 Compression
Compress and expand IPv6 addresses — RFC 5952 compliant
IP to Decimal Converter
Convert IP addresses between decimal, hex, and binary
What Is My IP
Find your public IP address with geolocation and ISP info
Ping Tool
Test connectivity and latency to any host
Port Checker
Test port connectivity and service availability
Domain to IP
Find the IP address of any website with CDN detection

Frequently Asked Questions

What is a subnet calculator?

A subnet calculator is a tool that takes an IP address and CIDR prefix length (like 192.168.1.0/24 for IPv4 or 2001:db8::/48 for IPv6) and calculates all subnet details. For IPv4: network address, broadcast address, subnet mask, wildcard mask, usable hosts, and IP class. For IPv6: expanded/compressed forms, network prefix, address range, address type, and scope. It helps network administrators plan IP allocation without manual binary math.

What is CIDR notation and how does it work?

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its network prefix in the format IP/prefix (e.g., 192.168.1.0/24). The number after the slash indicates how many bits of the 32-bit IPv4 address are used for the network portion. For example, /24 means the first 24 bits are the network part (subnet mask 255.255.255.0), leaving 8 bits for host addresses (256 total, 254 usable). CIDR replaced the older classful addressing system for more flexible IP allocation.

How do I convert a subnet mask to CIDR notation?

To convert a subnet mask to CIDR, count the number of consecutive 1-bits in the binary representation. For example, 255.255.255.0 in binary is 11111111.11111111.11111111.00000000 — that's 24 ones, so CIDR is /24. Common conversions: 255.0.0.0 = /8, 255.255.0.0 = /16, 255.255.255.0 = /24, 255.255.255.128 = /25, 255.255.255.192 = /26, 255.255.255.240 = /28, 255.255.255.252 = /30.

What is the difference between subnet mask and wildcard mask?

A subnet mask and wildcard mask are bitwise inverses. The subnet mask uses 1s for network bits and 0s for host bits (e.g., 255.255.255.0), while the wildcard mask flips this (e.g., 0.0.0.255). Subnet masks are used in network interface configuration and routing tables, while wildcard masks are used in Cisco ACLs and OSPF area configuration. To convert: subtract each octet from 255.

What is the network address and broadcast address?

The network address is the first address in a subnet (e.g., 192.168.1.0 in a /24), identifying the network itself. The broadcast address is the last address (e.g., 192.168.1.255), used to send packets to all hosts in the subnet. Neither can be assigned to hosts. Usable addresses fall between them — for a /24, that's 192.168.1.1 through 192.168.1.254 (254 usable).

How many usable hosts does each CIDR prefix provide?

The formula is 2^(32-prefix) - 2. Common examples: /8 = 16,777,214 hosts, /16 = 65,534 hosts, /20 = 4,094 hosts, /24 = 254 hosts, /25 = 126 hosts, /26 = 62 hosts, /27 = 30 hosts, /28 = 14 hosts, /29 = 6 hosts, /30 = 2 hosts (point-to-point), /31 = 2 hosts (RFC 3021, no broadcast), /32 = 1 host (single address).

What are private IP address ranges?

RFC 1918 defines three private ranges: 10.0.0.0/8 (16.7M addresses, Class A), 172.16.0.0/12 (1M addresses, Class B), and 192.168.0.0/16 (65K addresses, Class C). These are not routable on the public internet and require NAT to reach external hosts. Our subnet calculator automatically detects private ranges.

What is subnetting and why is it important?

Subnetting divides a large IP network into smaller subnets for: (1) efficient IP allocation, (2) improved security via isolation, (3) reduced broadcast traffic, (4) simplified management, (5) regulatory compliance. For example, splitting a /24 into four /26 subnets creates four 62-host networks.

What is a /31 and /32 subnet used for?

A /31 subnet (RFC 3021) provides exactly 2 IPs with no network or broadcast address — ideal for point-to-point router links, saving one address vs /30. A /32 represents a single host address and is used for loopback interfaces, host routes, firewall rules, and BGP peering.

How do I plan subnets for my network?

Count hosts needed per subnet with 20-30% growth buffer, choose the smallest CIDR that fits, allocate from a larger block using powers of 2, reserve the first subnet for infrastructure, and document everything. Example: for a /24 block needing 50 users, 20 servers, 10 IoT devices — use /26 (62), /27 (30), and /28 (14) respectively.

Does this subnet calculator support IPv6?

Yes. Our subnet calculator supports both IPv4 and IPv6. Switch to the IPv6 tab to enter any IPv6 address with a prefix length (/8 to /128). The IPv6 calculator shows the expanded and compressed address forms, network prefix, first and last addresses, total addresses, address type (Global Unicast, Link-Local, Unique Local, Multicast, Loopback, IPv4-Mapped), and scope. IPv6 uses 128-bit addresses and does not have broadcast addresses — it uses multicast instead.

What is the standard IPv6 subnet size?

The standard IPv6 subnet size is /64, which provides 2^64 (approximately 18.4 quintillion) addresses. This is required for SLAAC (Stateless Address Autoconfiguration) to work correctly, as the last 64 bits are used for the interface identifier. ISPs typically allocate /48 per organization and /56 per residential customer. For point-to-point links, /127 (RFC 6164) is recommended.