ip address mask calculator

IPv4 Subnet Calculator

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

Tip: If you provide both CIDR and subnet mask, they must match.

What an IP Address Mask Calculator Does

An IP address mask calculator helps you understand how an IPv4 network is split into network and host portions. By combining an IP address with a subnet mask (or CIDR prefix), the calculator shows your network address, broadcast address, usable host range, and capacity.

This is essential for network planning, troubleshooting, firewall rules, and avoiding overlapping subnets in home, business, and cloud environments.

Key Terms You Should Know

IPv4 Address

An IPv4 address is a 32-bit value written in dotted decimal notation, such as 192.168.10.50. It identifies a device or interface on a network.

Subnet Mask

A subnet mask (like 255.255.255.0) marks which bits belong to the network and which belong to hosts. More 1-bits means a smaller subnet with fewer hosts.

CIDR Prefix

CIDR notation writes the mask as a prefix, such as /24. This means 24 bits are network bits. For example:

  • /8 = 255.0.0.0
  • /16 = 255.255.0.0
  • /24 = 255.255.255.0

How the Calculator Computes Results

  • Converts the IP and mask into binary form.
  • Performs bitwise AND to find the network address.
  • Uses the inverse mask to find the broadcast address.
  • Determines first and last usable host addresses.
  • Calculates total and usable host counts.

Practical Example

If your IP is 10.0.5.76 and prefix is /20, your mask becomes 255.255.240.0. The network may span multiple values in the third octet, and the calculator instantly shows the exact host range and broadcast limit.

Doing this manually is possible, but a calculator dramatically reduces mistakes and saves time.

Why This Matters in Real Networks

  • Network design: Plan VLANs and segmentation with confidence.
  • Troubleshooting: Verify whether two hosts are in the same subnet.
  • Security: Build accurate ACLs and firewall policies.
  • Cloud and DevOps: Prevent CIDR overlap across VPCs/VNets.

Common Prefixes at a Glance

  • /24 → 256 total addresses, 254 usable
  • /25 → 128 total addresses, 126 usable
  • /26 → 64 total addresses, 62 usable
  • /27 → 32 total addresses, 30 usable
  • /28 → 16 total addresses, 14 usable
  • /30 → 4 total addresses, 2 usable (common for point-to-point)

Final Notes

Use this IP address mask calculator whenever you need quick, accurate subnetting results. It supports both CIDR and dotted decimal masks, validates inputs, and returns network values in plain language you can apply immediately.

🔗 Related Calculators