Subnet Calculator (IPv4 CIDR)

This subnet calculator takes an IPv4 address and a CIDR prefix (/0 to /32) and w

Updated
Loading toolโ€ฆ

This subnet calculator takes an IPv4 address and a CIDR prefix (/0 to /32) and w

How to use Subnet Calculator (IPv4 CIDR)

  1. Enter an IPv4 address such as 192.168.1.10 in the address field.
  2. Choose a CIDR prefix from /0 to /32 (the matching subnet mask is shown next to each option).
  3. Read off the network, broadcast, masks, usable host range and host counts, and copy any value you need.
Try next โ†’Caesar Cipher Encoder & DecoderA Caesar cipher shifts every letter in your message forward or backward by a fix

About Subnet Calculator (IPv4 CIDR)

This subnet calculator takes an IPv4 address and a CIDR prefix (/0 to /32) and works out the full subnet: the network address, broadcast address, subnet mask, wildcard mask, the first and last usable host, and both the total and usable host counts. It also flags the address class and whether the IP falls in a private (RFC 1918), loopback, link-local, or multicast range, and shows a binary breakdown of the mask and network so you can see exactly where the boundary sits.

The math follows the standard rules: for a normal prefix the usable host count is 2^(32 - prefix) minus the network and broadcast addresses. Two special cases are handled the way routers treat them: a /31 is shown as a two-host point-to-point link (RFC 3021) with no broadcast, and a /32 is treated as a single host route. Malformed input is caught before any calculation runs.

Everything is computed with plain JavaScript bit math right in your browser. No IP address, prefix, or result is uploaded or logged anywhere, which makes it safe to use on internal or production network details. This tool covers IPv4 only; it does not calculate IPv6 subnets or split a block into multiple smaller subnets (VLSM).

Frequently asked questions

How do I use this subnet calculator?
Type an IPv4 address like 192.168.1.10, then pick a CIDR prefix such as /24 from the dropdown. The network address, broadcast, subnet mask, wildcard mask, usable host range and host counts update instantly.
How is the usable host count calculated?
For a standard subnet it is 2^(32 - prefix) total addresses minus 2 (one for the network address, one for the broadcast). A /31 shows 2 usable hosts as a point-to-point link (RFC 3021), and a /32 is a single host.
What is the difference between the subnet mask and the wildcard mask?
The subnet mask (e.g. 255.255.255.0) marks the network bits with 1s. The wildcard mask is its inverse (0.0.0.255) and is what tools like Cisco ACLs and OSPF use to match the host portion.
Does this work with private IP addresses?
Yes. It works with any valid IPv4 address and additionally labels the scope, so it will tell you when an address is private (RFC 1918), loopback, link-local (APIPA), or multicast/reserved.
Is my IP address or network data sent anywhere?
No. All calculations run locally in your browser using JavaScript bit math. Nothing is uploaded, stored, or logged, so it is safe to use with internal network details.
Does it support IPv6 or splitting a block into subnets?
Not yet. This tool handles IPv4 addressing only and reports one subnet at a time. It does not calculate IPv6 or perform VLSM (splitting one block into several smaller subnets).