What Is Subnet Calculator?

A free online subnet calculator for network engineers and IT professionals. Enter an IP address and CIDR prefix to get the network address, broadcast address, usable host range, subnet mask, wildcard mask, total hosts, IP class, and binary representations. Supports all CIDR values from /0 to /32.

Subnetting is the practice of dividing an IP network into smaller subnetworks for routing efficiency, security segmentation, and address management. Subnet Calculator computes all key parameters from an IP address and CIDR prefix: network address, broadcast address, usable host range, subnet mask, wildcard mask, total hosts, IP class, and binary representations.

Enter an IP address in dotted decimal notation (e.g., 192.168.1.0) and select the CIDR prefix length from /0 to /32 using the slider or quick-select buttons for common prefixes (/8, /16, /24, /32). The calculator immediately displays: Network address (the first address in the subnet), broadcast address (the last address), usable host range (all addresses between network and broadcast), subnet mask (in dotted decimal, e.g., 255.255.255.0), wildcard mask (the inverse of the subnet mask), total number of hosts (2^(32-CIDR)), and number of usable hosts (total - 2).

The binary representation shows both the IP address and subnet mask in binary format for educational purposes — essential for understanding how the subnet mask separates the network portion from the host portion. The IP class (A, B, C, D, E) is also displayed based on the first octet.

The CIDR slider ranges from /0 (0.0.0.0/0, the entire internet) to /32 (a single host). Common values: /24 (256 addresses, 254 usable — typical office subnet), /16 (65,536 addresses — large organization), /8 (16.7 million — very large network).

Real-World Use Cases for Subnet Calculator

Planning a Small Office Subnet with /24 CIDR

A network engineer is setting up an office network. Enter 192.168.1.0 with CIDR /24. Network address: 192.168.1.0, broadcast: 192.168.1.255, usable range: 192.168.1.1-192.168.1.254, subnet mask: 255.255.255.0. Total hosts: 256, usable: 254 — plenty for a small office. The binary display shows the /24 boundary after 24 bits.

Checking If an IP Address Is Correct for Its Subnet

A device is configured with IP 10.0.5.137 and subnet mask /20. Enter these values. The network address is 10.0.0.0, broadcast is 10.0.15.255, usable range is 10.0.0.1-10.0.15.254. The IP 10.0.5.137 falls within this range, so the configuration is valid. Total hosts: 4,096.

Calculating Subnet Size for a Point-to-Point Link

A point-to-point connection between two routers only needs 2 usable addresses. Use CIDR /30. Enter 10.0.0.0/30. Network: 10.0.0.0, broadcast: 10.0.0.3, usable: 10.0.0.1 and 10.0.0.2. Usable hosts: 2. Total hosts: 4. This is the most efficient CIDR for point-to-point links.

Why Use Subnet Calculator?

  • CIDR /0 to /32 support
  • Network, broadcast, host range calculation
  • Subnet mask and wildcard mask
  • Binary IP and mask display

How to Use Subnet Calculator — Step by Step

1

Enter an IP address in dotted decimal notation.

2

Select the CIDR prefix length (0-32) using the slider or quick buttons.

3

View the network address, broadcast, host range, and mask.

4

Check binary representations and IP class details.

Who Is Subnet Calculator Best For?

  • network engineers
  • IT administrators
  • DevOps engineers
  • students

Pro Tips for Subnet Calculator

  • 1The usable host count is always total hosts minus 2 (network address and broadcast address cannot be assigned to hosts). For /31, the formula gives 2^1 - 2 = 0 usable hosts, but /31 is used for point-to-point links where broadcast is not needed.
  • 2The wildcard mask is the inverse of the subnet mask — in binary, every 0 becomes 1 and every 1 becomes 0. It is used in access control lists (ACLs) and routing protocols (OSPF) for matching.
  • 3For IPv4, the first octet determines the address class: 1-126 (A), 128-191 (B), 192-223 (C), 224-239 (D multicast), 240-255 (E reserved).
  • 4When subnetting, plan for growth. A /24 subnet (254 usable hosts) might seem excessive for 10 devices, but it allows the network to grow without renumbering.

Subnet Calculator — Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation uses an IP address followed by a slash and a number (e.g., 192.168.1.0/24) that indicates how many bits are used for the network prefix.

How do I calculate usable hosts?

Usable hosts = 2^(32-CIDR) - 2. The -2 accounts for the network address (first) and broadcast address (last), which cannot be assigned to hosts.

Can I use these tools with sensitive/proprietary data?

Absolutely. All processing runs locally in your browser with zero server uploads. This makes these tools safe for proprietary code, internal API keys, and confidential data.

Do these tools work offline?

Yes, once the page has loaded, most developer tools continue functioning without an internet connection. This makes them ideal for air-gapped environments or travel.

What browsers are supported?

All modern browsers are supported: Chrome, Firefox, Safari, and Edge. Internet Explorer is not supported. The tools leverage modern JavaScript APIs like Web Crypto, TextEncoder, and BigInt.

Ready to Use Subnet Calculator?

Free online tool — works in your browser, no sign-up required. Start using it right now.

Try It Now
Free Forever · No Sign-up

182 Free Tools at Your Fingertips

All free online tools for developers, designers, students, and creators. Every tool works in your browser — no sign-up, no data collection.