IP Tools

Subnet Mask Calculator

Convert CIDR ↔ subnet mask and see network size and host counts.

Introduction

Convert between CIDR prefix and dotted subnet mask; see network size and usable hosts.

How to use this subnet mask calculator tool

  1. Enter CIDR (/24) or mask (255.255.255.0).
  2. The other field updates automatically.
  3. Click Calculate for host counts.

What Is This Tool?

Subnet masks and CIDR prefixes express the same network boundary. /24 ↔ 255.255.255.0.

How to Use This Tool

  • Enter CIDR (/24) or mask (255.255.255.0).
  • The other field updates automatically.
  • Click Calculate for host counts.

Formula / Calculation Logic

Mask bits = CIDR prefix. Wildcard = inverse of mask for ACLs.

Examples

Sample inputs and expected outputs:

InputResult
/24255.255.255.0 — 254 hosts
/25255.255.255.128 — 126 hosts
255.255.255.192/26

Understanding Results

  • Subnet mask — contiguous ones in binary.
  • CIDR — routing shorthand.
  • Usable hosts — depends on /31 /32 rules.

Use Cases

  • Exam prep
  • Mask ↔ prefix drills
  • ACL wildcard derivation

Benefits

  • Bidirectional conversion
  • Validates contiguous masks

Common Mistakes

Avoid these errors when using this network calculator:

Planning pitfalls

  • Non-contiguous masks (invalid)
  • Confusing wildcard with subnet mask

Disclaimer

This calculator is for education, lab work, and network planning. Always verify production firewall, routing, and cloud VPC settings before deployment.

subnet mask calculator — frequently asked questions

A subnet mask calculator applies standard IPv4 subnet math (RFC 950 / CIDR) to compute network boundaries, masks, and host counts without manual binary conversion.

You enter IPv4 addresses, masks, or CIDR notation. The calculator bitwise-ANDs the address with the mask to find the network ID, then derives broadcast, wildcard, and host ranges.

Use it during CCNA study, VPC design, firewall rule documentation, IPAM planning, and troubleshooting when you need quick confirmation of subnet boundaries.

Yes. VSPIC runs calculations in your browser with no account required.

These calculators focus on IPv4. For IPv6 prefix planning, use our IPv6 Test and IP Subnet Calculator IPv6 tab.

CIDR writes the prefix length after a slash (e.g. /24). It replaces legacy classful networks and is used in routing tables worldwide.

A subnet mask marks which bits belong to the network portion. A /24 equals 255.255.255.0 with 254 usable hosts in typical subnets.

Yes. RFC 1918 addresses (10.x, 172.16–31.x, 192.168.x) use the same subnet mathematics as public space.

Set all host bits to 1 in the subnet — bitwise OR of network address with the inverted mask.

Variable Length Subnet Masking uses different prefix lengths within one parent network to minimize wasted addresses.

Next step for subnet mask calculator

Continue with ip lookup on VSPIC.

IP Lookup

Trusted by Users Who Value Privacy

Always Free

No premium plan ever

100% Private

Files processed in browser

Instant Results

Convert in seconds

Works Everywhere

Any device, any OS