Universal Calculator
TAIIR

Subnet Calculator

Calculate IPv4 subnet details including network address, broadcast address, host range, wildcard mask, and binary representation from any IP and CIDR prefix.

Common Subnet Reference

CIDR Subnet Mask Hosts Addresses
/32255.255.255.25511
/30255.255.255.25224
/28255.255.255.2401416
/24255.255.255.0254256
/16255.255.0.065,53465,536
/8255.0.0.016,777,21416,777,216
Enter an IP address and CIDR prefix, then click Calculate.

Mastering IPv4 Subnetting: The Complete Guide

Subnetting is a foundational skill for network engineers, system administrators, and anyone working with IP networks. This Subnet Calculator takes the complexity out of manual subnet calculations, delivering instant, accurate results for any IPv4 address and CIDR prefix. From network and broadcast addresses to wildcard masks and binary representations, this tool provides a complete picture of your subnet, making it invaluable for network design, troubleshooting, and certification exam preparation (CCNA, Network+, etc.).

Understanding IP Addresses and Subnet Masks

An IPv4 address is a 32‑bit number, typically written as four decimal octets separated by dots (e.g., 192.168.1.10). A subnet mask is also a 32‑bit number that divides the IP address into a network portion and a host portion. The mask uses contiguous 1‑bits to represent the network part and 0‑bits for the host part. For example, a subnet mask of 255.255.255.0 in binary is 11111111.11111111.11111111.00000000—the first 24 bits are the network, leaving 8 bits for hosts.

CIDR Notation: The Modern Standard

Classless Inter‑Domain Routing (CIDR) notation expresses the subnet mask as a slash followed by the number of network bits (e.g., /24). This is far more concise than writing out the full dotted‑decimal mask. CIDR allows flexible subnet sizes, eliminating the rigid classful boundaries (Class A, B, C). With CIDR, you can create subnets of any size, optimizing IP address utilization.

🔢 Key Subnet Formulas

  • Total Addresses = 2(32 - CIDR)
  • Usable Hosts = Total Addresses - 2 (except /31 and /32)
  • Network Address = IP Address AND Subnet Mask
  • Broadcast Address = Network Address OR Wildcard Mask
  • Wildcard Mask = NOT Subnet Mask (bitwise)

Network, Broadcast, and Host Addresses

Every subnet has two reserved addresses: the network address (first address) identifies the subnet itself, and the broadcast address (last address) is used to send traffic to all hosts on that subnet. The addresses between these two are usable host addresses that can be assigned to devices. For a /24 subnet (256 total addresses), the first address is .0 (network), the last is .255 (broadcast), leaving .1 through .254 for hosts.

Wildcard Masks and Their Use

A wildcard mask is the bitwise inverse of the subnet mask. While a subnet mask uses 1s to indicate network bits, a wildcard mask uses 1s to indicate bits that can vary. Wildcard masks are primarily used in Cisco Access Control Lists (ACLs) and routing protocols like OSPF to match a range of IP addresses efficiently. For a /24 subnet (mask 255.255.255.0), the wildcard mask is 0.0.0.255.

Binary Visualization for Deeper Understanding

Our calculator displays the IP address, subnet mask, network address, and broadcast address in binary format, with the network bits highlighted in gold. This visual separation reinforces how the subnet mask carves out the network and host portions, making the concept of subnetting tangible and easier to grasp for students and professionals alike.

Frequently Asked Questions

What is a subnet mask?

A subnet mask is a 32‑bit number that separates the network portion of an IP address from the host portion. For example, 255.255.255.0 (/24) means the first three octets identify the network.

What is the difference between network and broadcast address?

The network address is the first address in a subnet, identifying the network itself. The broadcast address is the last address, used to send data to all hosts. Neither can be assigned to devices.

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask, used in ACLs and routing protocols. For mask 255.255.255.0, the wildcard is 0.0.0.255.

How many usable hosts are in a /24 subnet?

A /24 subnet has 256 total addresses. Subtract the network and broadcast addresses, leaving 254 usable host addresses.

Does this calculator support IPv6?

This calculator is designed for IPv4. IPv6 uses 128‑bit addresses and a different subnetting methodology.

Explore more networking tools: