ip address and subnet mask calculator

If you work with home networks, enterprise infrastructure, cloud VPCs, or cybersecurity labs, you eventually need quick and accurate subnet calculations. This IP address and subnet mask calculator helps you convert an IPv4 address plus mask into the exact network details you need in seconds.

IPv4 Subnet Calculator

Accepted formats: dotted-decimal mask, "/24", or plain prefix like "24".

What this calculator gives you

After entering an IP and subnet mask, the tool computes the values network engineers use most:

  • Network address (base address of the subnet)
  • Broadcast address (last address in the subnet)
  • First and last usable host addresses
  • Total addresses and usable hosts
  • Wildcard mask (inverse mask, useful in ACLs)
  • Binary view of IP, mask, and network

How to use the IP address and subnet mask calculator

Step 1: Enter an IPv4 address

Use standard dotted decimal notation, such as 10.0.15.200 or 172.16.4.19.

Step 2: Enter the mask

You can type:

  • A full mask: 255.255.255.0
  • CIDR slash notation: /24
  • Prefix only: 24

Step 3: Click Calculate

The result panel will display a complete subnet breakdown immediately.

Subnetting concepts in plain language

Network bits vs host bits

The subnet mask splits an address into two parts: the network portion and the host portion. A /24 means the first 24 bits define the network, and the remaining 8 bits define hosts.

Network and broadcast addresses

The network address identifies the subnet itself. The broadcast address reaches all devices in that subnet. In many subnets, these two values are reserved and not used as normal host assignments.

Usable hosts

For most subnet sizes, usable hosts are 2^(host bits) - 2. Special cases:

  • /31 supports point-to-point links with two usable addresses
  • /32 is a single-host route

Common subnet examples

  • /24 → 256 total addresses, 254 usable
  • /26 → 64 total addresses, 62 usable
  • /30 → 4 total addresses, 2 usable (legacy point-to-point pattern)
  • /31 → 2 total addresses, typically 2 usable on P2P links

Practical tips

  • Always validate that your mask is contiguous (all 1s then all 0s in binary).
  • Document network ranges to avoid overlapping VLANs or cloud subnets.
  • Use the wildcard mask when writing router/switch ACL entries.
  • Keep a consistent subnetting plan to simplify troubleshooting and growth.

Final thoughts

Whether you're studying for Network+, CCNA, or simply managing your own infrastructure, a reliable subnet mask calculator saves time and avoids costly addressing mistakes. Bookmark this page and use it whenever you need fast IPv4 subnet math.

🔗 Related Calculators

🔗 Related Calculators