netmask subnet calculator

IPv4 Netmask & Subnet Calculator

Enter an IPv4 address and either a CIDR prefix or subnet mask to calculate network details instantly.

Supports dotted decimal format with optional inline CIDR.
If both CIDR and mask are entered, they must match.

What this netmask subnet calculator does

This tool is built to quickly answer the practical questions network engineers, students, and system administrators ask every day: What network is this host in? What is the broadcast address? How many usable hosts are available? Instead of manually converting binary or counting bits, you can enter an IP address plus CIDR (or netmask) and get complete subnet details in one step.

Why subnetting matters

Subnetting is the process of splitting an IP block into smaller, manageable networks. It helps with performance, security segmentation, and efficient address utilization. Whether you are designing VLANs, troubleshooting a routing issue, or preparing for a networking exam, knowing how netmasks and prefixes work is essential.

Typical use cases

  • Designing office LANs with separate subnets for departments.
  • Planning cloud VPC ranges and avoiding overlap.
  • Determining valid host ranges for static addressing.
  • Validating firewall rules and route summaries.
  • Studying IPv4 subnetting for certifications like Network+ or CCNA.

How to use the calculator

  • Enter a valid IPv4 address, such as 10.0.5.18.
  • Provide either a CIDR prefix (like /20) or a netmask (like 255.255.240.0).
  • Click Calculate Subnet.
  • Review the generated network address, broadcast address, first and last host, and host counts.

You can also paste inline CIDR notation directly into the IP field (for example, 172.16.50.7/27).

Quick subnet reference

CIDR Subnet Mask Total Addresses Usable Hosts (typical)
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/30 255.255.255.252 4 2

Understanding the output fields

Network address

The network address identifies the subnet itself. It is the first address in the range and cannot be assigned to a regular host (except in special routing contexts).

Broadcast address

The broadcast address is the last address in the subnet. Packets sent to this address are delivered to all hosts on that subnet (in traditional IPv4 broadcast domains).

Wildcard mask

The wildcard mask is the inverse of the subnet mask and is commonly used in ACLs and routing protocols. For example, subnet mask 255.255.255.0 corresponds to wildcard 0.0.0.255.

Common mistakes this tool helps you avoid

  • Using a non-contiguous subnet mask by accident.
  • Confusing host range with network and broadcast addresses.
  • Mixing up equivalent prefix and dotted mask values.
  • Allocating overlapping subnets in infrastructure planning.

Final thoughts

A netmask subnet calculator is one of the most practical tools in networking. It turns binary-heavy calculations into fast, reliable output so you can focus on architecture and troubleshooting. Bookmark this page and use it whenever you need a quick subnet check.

🔗 Related Calculators