NT Network Tools

Subnet Calculator

Calculate IPv4 network address, broadcast, usable host range, host count, wildcard mask and CIDR/mask conversions from an address and prefix. Runs entirely in your browser.

๐Ÿ”’ Runs entirely in your browser โ€” nothing is uploaded

Advertisement

What the subnet calculator does

This Subnet Calculator takes an IPv4 address together with a network size โ€” written either as a CIDR prefix length (for example /24) or as a dotted-decimal subnet mask (for example 255.255.255.0) โ€” and derives every value you usually need when planning or troubleshooting a network. It computes the network (subnet) address, the broadcast address, the first and last usable host addresses, the total number of addresses and the number of usable hosts, the wildcard mask used in access control lists, and the equivalent mask in both notations. It also shows the IP class and whether the address falls in a private range.

How the math works

An IPv4 address is 32 bits. The prefix length tells you how many leading bits identify the network; the remaining bits identify hosts. The calculator converts the address and mask to 32-bit integers, applies a bitwise AND to find the network address, and ORs in the inverted mask (the wildcard) to find the broadcast address. Usable hosts normally run from network + 1 to broadcast โˆ’ 1, giving 2^(32 โˆ’ prefix) โˆ’ 2 addresses. Two special cases are handled per the standards: a /31 behaves as an RFC 3021 point-to-point link with two usable addresses and no broadcast, and a /32 is a single-host route. Because the work is pure integer arithmetic, results are exact and instant.

Practical uses

Network administrators use subnet calculations constantly: carving an office network into VLANs, sizing a DHCP scope, writing firewall and ACL rules with wildcard masks, validating a static route, or simply confirming which broadcast address a host will use. Students learning CIDR can experiment with different prefixes to see how the usable host count halves with each added network bit. Everything here runs locally in your browser with no uploads and no external API calls, so you can safely test internal addressing plans without exposing them. As always, verify the output against your actual device configuration before relying on it for production changes.

How to use

  1. Enter an IPv4 addressType a dotted-quad address such as 192.168.1.10.
  2. Choose a prefix or maskEnter a CIDR prefix like 24, or a subnet mask like 255.255.255.0.
  3. Read the resultsSee the network, broadcast, usable host range, host count, wildcard and mask conversions.

Frequently asked questions

Does this support IPv6?
No. This calculator focuses on IPv4 addressing (dotted-quad with a /0โ€“/32 prefix or a dotted-decimal mask).
Why do /31 and /32 show different host counts?
A /32 describes a single host route, and a /31 is a two-address point-to-point link (RFC 3021) with no separate network or broadcast address, so both usable addresses are listed.
Is my input sent anywhere?
No. All bitwise math runs in your browser with plain JavaScript. Nothing is uploaded and no API is called.
Advertisement