IPv4 Subnet Calculator
Calculate subnet masks, network ranges, broadcast, and host addresses
What is an IPv4 Subnet Calculator?
An IPv4 Subnet Calculator is an essential networking tool that helps network engineers determine the network address, broadcast address, usable host range, and subnet mask for any given IP address and CIDR prefix. Whether you're designing a new network infrastructure or troubleshooting existing configurations, understanding subnet boundaries is critical for proper IP address management.
This tool performs all calculations instantly in your browser — no data is sent to any server. Simply enter an IP address and CIDR prefix (0-32) to get complete subnet information including binary representations, wildcard masks, and IP classification.
How to Use This Tool
- Enter your IP address — Type any valid IPv4 address (e.g., 192.168.1.100) in the input field.
- Set the CIDR prefix — Enter a value between 0 and 32. Common values include /24 (255.255.255.0), /16 (255.255.0.0), and /8 (255.0.0.0).
- Click Calculate — The tool instantly computes all subnet parameters and displays results in the panel below.
- Review results — Examine the network address, broadcast address, usable host range, and other details. Use the "Copy All" button to export results.
When Do You Need a Subnet Calculator?
Network Design: When planning a new network, you need to determine appropriate subnet sizes for different departments, ensuring efficient IP address allocation without waste.
Troubleshooting: When diagnosing connectivity issues, verifying that devices are on the correct subnet is often the first step. This tool helps confirm whether two IPs can communicate directly.
Documentation: Maintaining accurate network documentation requires precise subnet information. Use this tool to generate accurate records for your IP address management (IPAM) system.
Security Audits: Understanding subnet boundaries helps identify potential security zones and plan firewall rules accordingly.
Understanding the Results
Network Address: The first address in the subnet, used to identify the network itself. This address cannot be assigned to a host.
Broadcast Address: The last address in the subnet, used to send messages to all hosts on the network. This address also cannot be assigned to a host.
Subnet Mask: A 32-bit number that separates the network portion from the host portion of an IP address. Represented in dotted-decimal notation (e.g., 255.255.255.0).
Wildcard Mask: The inverse of the subnet mask, commonly used in access control lists (ACLs) and routing protocols like OSPF.
Usable Range: The range of IP addresses that can be assigned to hosts (excluding network and broadcast addresses).
Total/Usable Hosts: The total number of addresses in the subnet minus 2 (for /31 and /32, special rules apply per RFC 3021).
Networking Background: Subnetting Fundamentals
Subnetting is the practice of dividing a network into smaller, logical sub-networks (subnets). This improves network performance by reducing broadcast traffic, enhances security by isolating network segments, and enables efficient IP address utilization.
CIDR (Classless Inter-Domain Routing) notation, introduced in 1993, replaced the older classful network design. Instead of fixed class boundaries (Class A: /8, Class B: /16, Class C: /24), CIDR allows variable-length subnet masks, giving network engineers precise control over address allocation.
The CIDR prefix indicates how many bits are used for the network portion. For example, /24 means the first 24 bits identify the network, leaving 8 bits for hosts (256 total addresses, 254 usable).
Tips & Best Practices
• Always document your subnet plan before deployment to avoid IP conflicts.
• Use /31 subnets for point-to-point links (RFC 3021) to conserve addresses.
• Reserve the first and last usable addresses for critical infrastructure (gateway, DNS).
• Plan for growth — allocate subnets with room for future expansion.
• Use private address ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) for internal networks.
• Implement VLSM (Variable Length Subnet Masking) to optimize address usage across different-sized subnets.
Frequently Asked Questions
A /24 subnet has 256 total addresses (254 usable), while a /25 has 128 total addresses (126 usable). /25 effectively splits a /24 into two equal halves, each with half the address space.
The network address identifies the subnet itself, and the broadcast address is used to send messages to all hosts. Assigning these to devices would cause routing conflicts and network communication issues.
A wildcard mask is the inverse of a subnet mask (0s become 1s and vice versa). It's primarily used in Cisco ACLs and routing protocols like OSPF to specify which bits should be matched.
Yes! RFC 3021 allows /31 subnets for point-to-point links, providing exactly 2 usable addresses with no network or broadcast address. This conserves IP addresses on router-to-router connections.
Calculate the number of hosts you need, then choose the smallest CIDR that accommodates them. Add 20-30% buffer for growth. For example, 50 hosts need a /25 (126 usable), not a /26 (62 usable).
Sized this for your site?
Free engineers turn these numbers into a working design — topology, hardware and quote included.