Subnet Calculator Calculate subnet details from IP address and CIDR prefix — network, broadcast, host range, and mask.
Subnet Calculator
Calculate subnet details from IP address and CIDR prefix — network, broadcast, host range, and mask.
Enter IP Address
Input an IPv4 address (e.g., 192.168.1.0).
Set CIDR Prefix
Use the slider or buttons to set the prefix length (/0 to /32).
View Subnet Details
See network address, broadcast, host range, mask, and binary representation.
What Is Subnet Calculator?
The Subnet Calculator analyzes an IPv4 address with CIDR prefix notation to display complete subnet information. Given an IP address and prefix length (e.g., 192.168.1.0/24), it calculates the network address, broadcast address, subnet mask, wildcard mask, first and last usable host addresses, number of usable hosts, IP class, and whether it's a private address. It also shows both the IP and mask in binary notation. The interactive CIDR slider and quick-select buttons for common prefix lengths make subnetting fast and intuitive.
Why Use Subnet Calculator?
-
Complete subnet information from IP + CIDR input
-
Interactive CIDR slider with quick-select buttons
-
Shows binary representation of IP and mask
-
Identifies IP class and private/public status
Common Use Cases
Network Design
Plan IP address allocation and subnet sizing for networks.
Firewall Rules
Determine correct network/mask for ACLs and firewall rules.
Troubleshooting
Verify subnet configuration and identify connectivity issues.
Education
Learn subnetting concepts with visual binary representation.
Technical Guide
Subnet calculations use bitwise operations on 32-bit integers. Subnet Mask = ~0 << (32 - prefix) (left-shift all-ones to zero out host bits). Network Address = IP AND Mask. Broadcast Address = Network OR (NOT Mask). First Host = Network + 1 (for prefix < 31). Last Host = Broadcast - 1. Usable Hosts = 2^(32-prefix) - 2 (for prefix ≤ 30). Special cases: /31 has 2 hosts (point-to-point links per RFC 3021), /32 has 1 host (single address). IP Classes: A (0-127), B (128-191), C (192-223), D (224-239, multicast), E (240-255, reserved). Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
Tips & Best Practices
-
1Common subnets: /24 = 254 hosts, /16 = 65,534 hosts, /8 = 16.7M hosts
-
2Always reserve network and broadcast addresses — they are not usable for hosts
-
3Use /30 or /31 for point-to-point links between routers
-
4Private IP ranges (10.x, 172.16-31.x, 192.168.x) are not routable on the internet
Related Tools
Number Base Converter
Convert numbers between any bases from 2 to 36, including binary, octal, decimal, and hex.
🔢 Math & Calculators
Bandwidth Calculator
Convert between bandwidth and data rate units — bps, Kbps, Mbps, Gbps, MB/s, and more.
🔢 Math & Calculators
Download Time Calculator
Calculate how long a file download will take based on file size and connection speed.
🔢 Math & Calculators
IP Range Calculator
Convert between IP address ranges and CIDR notation, showing total addresses and range details.
🔢 Math & CalculatorsFrequently Asked Questions
Q What is CIDR notation?
Q How many hosts can a /24 subnet have?
Q What is the difference between network and broadcast address?
Q What is a wildcard mask?
Q What are private IP addresses?
About This Tool
Subnet Calculator is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.