Subnet CalculatorCalculate 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 Our 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 ones, then unsigned right-shift). 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

IP Range Calculator
Convert between IP address ranges and CIDR notation, showing total addresses and range details.

Bandwidth Calculator
Convert between bandwidth and data rate units — bps, Kbps, Mbps, Gbps, MB/s, and more.

Download Time Calculator
Calculate how long a file download will take based on file size and connection speed.

Number Base Converter
Convert numbers between any bases from 2 to 36, including binary, octal, decimal, and hex.

Percentage Calculator
Calculate percentages, percentage change, and what percent one number is of another.

Fraction Calculator
Add, subtract, multiply, and divide fractions with automatic simplification.
Frequently Asked Questions
QWhat is CIDR notation?
QHow many hosts can a /24 subnet have?
QWhat is the difference between network and broadcast address?
QWhat is a wildcard mask?
QWhat are private IP addresses?
About Subnet Calculator
Subnet Calculator is a free online tool from FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration required. No ads. Just fast, reliable tools.







