IP Subnet Calculator

Calculate IP subnets

What Is This Tool?

The IP Subnet Calculator takes an IPv4 address with a CIDR prefix (like 192.168.1.10/24) and computes the network address, broadcast address, subnet mask, wildcard mask, usable host range, and total usable host count. It's useful for network engineers, sysadmins, and anyone configuring VLANs, firewalls, or routing.

How to Use

1

Enter an IP address followed by a CIDR prefix, such as 192.168.1.10/24.

2

Click Calculate to compute the full subnet breakdown.

3

Copy the result summary for documentation or configuration notes.

Features

  • Computes network and broadcast addresses
  • Computes subnet mask and wildcard mask in dotted decimal
  • Computes first/last usable host and total usable hosts
  • Correctly handles /31 point-to-point links and /32 host routes
  • Friendly validation for invalid octets or prefixes
  • 100% client-side — nothing leaves your browser

Examples

Input: 192.168.1.10/24

Output: Network 192.168.1.0, Broadcast 192.168.1.255, Mask 255.255.255.0, Usable range 192.168.1.1–192.168.1.254, 254 usable hosts.

Common Use Cases

  • Planning subnet sizes when segmenting a network
  • Verifying the usable host range of an existing subnet
  • Checking /31 and /32 special-case addressing for point-to-point links
  • Documenting network ranges for firewall rules or VPC configuration

Frequently Asked Questions

Why does /31 show 2 usable hosts instead of 0?

Per RFC 3021, a /31 subnet has no distinct network or broadcast address and both addresses are treated as usable, which is the standard convention for point-to-point links.

Why does /32 show 1 usable host?

A /32 prefix identifies a single host address with no separate network or broadcast address, so it is treated as exactly one usable address (a host route).

What is a wildcard mask?

A wildcard mask is the bitwise inverse of the subnet mask. It is commonly used in Cisco access control lists and OSPF configuration instead of the subnet mask.

Does this support IPv6?

No, this calculator is for IPv4 addresses and CIDR prefixes only.

Is my IP address sent anywhere?

No. All calculations happen locally in JavaScript in your browser using bitwise arithmetic. Nothing is uploaded or logged.

What happens if I enter an invalid octet or prefix?

The tool validates that each IP octet is between 0 and 255 and the CIDR prefix is between 0 and 32, showing a specific error message if either is out of range.