IPv4 Subnet Calculator

IPv4 Subnet Calculator

Calculate network address, subnet mask, broadcast, host range, and usable hosts from IP + prefix. Use this online tool instantly.

Configuration

Subnet Output

About The IPv4 Subnet Calculator

The IPv4 Subnet Calculator takes an IPv4 address and CIDR prefix and calculates the subnet details you usually need for network planning: class, CIDR, network address, broadcast address, subnet mask, wildcard mask, first host, last host, total addresses, usable hosts, and binary mask/network forms.

The calculation runs in the browser and normalizes host IP input to the matching network. For example, entering a host inside a /24 returns that subnet's network and broadcast boundaries.

How to Calculate an IPv4 Subnet Online

  1. Enter an IPv4 address, such as 192.168.10.42.
  2. Enter a CIDR prefix from 0 to 32.
  3. Click Calculate.
  4. Review the network, broadcast, mask, host range, and host count.
  5. Copy the output for firewall rules, network plans, ticket notes, or documentation.

Reading the Results

Network and broadcast:
The network address is the first address in the subnet. The broadcast address is the last address for conventional IPv4 subnets.

Usable hosts:
For most subnets, usable hosts exclude network and broadcast. /31 is treated as point-to-point, and /32 represents a single host address.

Wildcard mask:
The wildcard mask is the inverse of the subnet mask and is often used in ACL-style configuration.

Common Use Cases

  • Planning IPv4 subnets for internal networks, cloud VPCs, or lab environments.
  • Checking firewall, router, and ACL ranges before applying changes.
  • Explaining subnet boundaries in support tickets or documentation.
  • Learning how CIDR prefixes change address counts and host ranges.

Quick FAQ

Can I enter a host IP instead of the network IP?
Yes. The calculator can derive the network range from a host IP and prefix length.

Does this support IPv6 subnets?
No. This tool is for IPv4 CIDR calculations. Use IPv6-specific tooling for IPv6.

Does the calculation leave my browser?
No. IPv4 subnet math is designed to run locally in the browser.

Can I use it for firewall rule planning?
Yes for address ranges, but verify security policy, routing, broadcast/network address handling, and platform-specific syntax separately.