Subnet calculator for IPv4 and IPv6 CIDR networks

Enter an address with a prefix, such as 192.168.1.10/24, or with a subnet mask, and this subnet calculator shows the network and broadcast addresses, masks, usable host range and host count. IPv6 prefixes work too.

  • Free
  • No sign-up
  • Runs in your browser

Loading the tool…

Runs in your browser — nothing you enter is sent to our servers.

How to use Subnet Calculator

  1. Type an IPv4 address with a prefix length (192.168.1.10/24) or a mask (192.168.1.10 255.255.255.0), or an IPv6 prefix such as 2001:db8::/48.
  2. Read the results. For IPv4 they include the network, broadcast, subnet mask, wildcard mask, first and last usable host, total addresses and usable hosts.
  3. Check the address type, for example private, public or loopback, and the binary form of the mask.
  4. Use the prefix table from /16 to /32 to compare masks and address counts.

Features

  • IPv4 input as CIDR (192.168.1.10/24) or address plus mask
  • Network address, broadcast address, subnet mask, wildcard mask and binary mask
  • First and last usable host, total addresses and usable hosts
  • Handles /31 (2 usable hosts, RFC 3021) and /32 (1 host)
  • Address type such as private, public, loopback or CGNAT
  • Reference table of prefixes /16 to /32 with mask and address count
  • IPv6 results with network, last address, expanded address, total addresses, number of /64 subnets and type
  • Runs entirely in your browser. Nothing is sent to a server

Examples

InputResult
192.168.1.130/26Network 192.168.1.128, broadcast 192.168.1.191, mask 255.255.255.192, wildcard 0.0.0.63, hosts 192.168.1.129 to 192.168.1.190, 64 addresses, 62 usable.
10.0.0.1 255.0.0.0Prefix /8, network 10.0.0.0, broadcast 10.255.255.255, 16,777,214 usable hosts.
192.168.1.10/30Network 192.168.1.8, broadcast 192.168.1.11, mask 255.255.255.252, hosts 192.168.1.9 to 192.168.1.10, 4 addresses, 2 usable.
2001:db8:abcd:12::1/48Network 2001:db8:abcd::, last address 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff, 65,536 subnets of size /64.

Limitations

  • An address without a prefix is treated as a single host.
  • The calculator does not plan or split networks for you. It describes the one subnet you enter.
  • Address type labels follow the special-purpose address registries. They do not tell you whether an address is in use or reachable.
  • Mask input must be a valid contiguous mask such as 255.255.255.0. Masks with gaps in their binary form are not valid in CIDR.

Learn more

An IPv4 address has 32 bits. A prefix length, written after a slash as in /24, says how many of those bits identify the network. The remaining bits identify hosts inside it. The subnet mask is the same idea written as four numbers, where every network bit is 1. A /26, for example, is 255.255.255.192.

Two addresses in each ordinary subnet are reserved: the first is the network address and the last is the broadcast address. That is why the number of usable hosts is 2^(32 − prefix) − 2. A /26 holds 64 addresses and 62 usable hosts. Point-to-point links can use /31 (RFC 3021) and then both addresses are usable, and a /32 describes a single host.

The wildcard mask is the bitwise opposite of the subnet mask and appears in some access list syntaxes. Classless notation, known as CIDR and described in RFC 4632, replaced the old class A, B and C boundaries.

IPv6 works the same way with 128 bits. A /48 is commonly used for a site and holds 65,536 subnets of size /64, which is the normal size of a single IPv6 network segment. IPv6 has no broadcast address.

Frequently asked questions

How many usable hosts does a /24 have?

A /24 has 256 addresses and 254 usable hosts, because the network and broadcast addresses are reserved.

What is the formula for usable hosts?

Usable hosts equal 2 to the power of (32 minus the prefix length), minus 2. For a /26 that is 64 minus 2, which gives 62.

What is a wildcard mask?

It is the inverse of the subnet mask. Where the subnet mask has 1 bits, the wildcard mask has 0 bits. Some router rules use it.

Why does a /31 show 2 usable hosts?

RFC 3021 allows /31 subnets on point-to-point links with no network or broadcast address, so both addresses can be used.

Is my input sent to a server?

No. The calculation runs in your browser.

Sources

Last reviewed: October 1, 2026