Subnet Mask Calculator

Enter an IPv4 address and CIDR prefix (e.g. 192.168.1.50/24) to instantly see the subnet mask, network address, broadcast address, host range, and usable host count.

IPv4 Subnet Input

You may include the prefix here (e.g. 10.0.0.1/8).

/

Enter a value from 0 to 32.

Quick Prefix Examples

Enter an IP address and prefix length, then click Calculate.

Copied!

Summary

Enter an IPv4 address and CIDR prefix (e.g. 192.168.1.50/24) to instantly see the subnet mask, network address, broadcast address, host range, and usable host count.

How it works

  1. Enter an IPv4 address in dotted-decimal notation (e.g. 192.168.1.100).
  2. Enter a CIDR prefix length between 0 and 32, or type the full address with slash notation (e.g. 192.168.1.100/24).
  3. Click "Calculate" — the tool derives the 32-bit subnet mask from the prefix length.
  4. It ANDs the IP with the subnet mask to find the network address.
  5. The broadcast address is found by ORing the network address with the inverted mask.
  6. Usable hosts are all addresses between network + 1 and broadcast - 1.

Use cases

  • Plan IP address allocation for office or home networks.
  • Verify subnetting homework and CCNA exam practice.
  • Troubleshoot routing issues by confirming network boundaries.
  • Design VPC or cloud network CIDR blocks.
  • Split a large network into smaller subnets for security zones.
  • Check whether two IP addresses belong to the same subnet.
  • Quickly find the broadcast address for directed broadcasts.
  • Document network topology with accurate subnet parameters.

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu