netmask calculator online

IPv4 Netmask Calculator

Quickly calculate subnet details like network address, broadcast address, host range, wildcard mask, and total hosts.

Enter a value from 0 to 32, or provide a subnet mask below.
If you enter a subnet mask, it will override the CIDR prefix.

What is a netmask?

A netmask (subnet mask) tells your network devices which part of an IPv4 address is the network portion and which part is the host portion. For example, in 192.168.1.10/24, the first 24 bits identify the network and the remaining 8 bits identify hosts inside that network.

In day-to-day networking, a netmask calculator helps you avoid manual binary math and quickly answer practical questions:

  • What is the network address?
  • What is the broadcast address?
  • How many usable IP addresses are available?
  • What is the valid host range?

How to use this online netmask calculator

Step 1: Enter an IPv4 address

Type any valid IPv4 address, such as 10.10.20.55 or 172.16.1.99.

Step 2: Enter either CIDR or subnet mask

You can use CIDR notation (like /27) or a dotted decimal mask (like 255.255.255.224). If both are entered, the mask value takes priority.

Step 3: Click Calculate

The calculator instantly outputs network details, including first/last host, wildcard mask, and address type.

Tip: CIDR and netmask are just two representations of the same thing. For example, /24 equals 255.255.255.0.

Common CIDR to netmask references

CIDR Subnet Mask Total Addresses Usable Hosts*
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422 (point-to-point)
/32255.255.255.25511 (single host)

*Usable host counts can vary for special routing cases, but these are the standard planning values.

Why subnet planning matters

Good subnet design improves security, performance, and scalability. Smaller subnets reduce broadcast traffic, while proper segmentation makes it easier to isolate environments such as:

  • User devices
  • Servers
  • VoIP phones
  • Guest Wi-Fi networks
  • IoT devices

Frequently asked questions

Is this calculator for IPv4 only?

Yes. This version is specifically built for IPv4 netmask calculations.

What if I enter an invalid subnet mask?

The calculator validates masks for contiguous 1-bits. Masks like 255.0.255.0 are rejected because they are not valid subnet masks.

Can I use this for CCNA or network certification prep?

Absolutely. It is useful for checking your manual subnetting practice and understanding the relationship between CIDR and dotted-decimal masks.

🔗 Related Calculators