IP Subnet Calculator

Calculate IPv4 and IPv6 subnet details — network, broadcast, usable host range, wildcard mask and subnet splits — from a CIDR address, entirely in your browser.

Loading calculator…

What this tool does

Calculate IPv4 and IPv6 subnet details — network, broadcast, usable host range, wildcard mask and subnet splits — from a CIDR address, entirely in your browser. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.

How to use the IP Subnet Calculator

  1. Enter or select ip version.
  2. Enter or select ip address or cidr (e.g. 192.168.1.0/26).
  3. Enter or select prefix length (used when the address has no /prefix).
  4. Read the calculated result; change any measurement to compare alternatives.

Formula

IPv4: network = IP AND mask; broadcast = network OR wildcard; total = 2^(32-prefix); usable = total - 2. IPv6 uses BigInt with total = 2^(128-prefix).
mode
IP version
ip
IP address or CIDR (e.g. 192.168.1.0/26)
prefix
Prefix length (used when the address has no /prefix)

Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.

Worked example

For ip subnet calculator, the following measurements illustrate the exact method: IP version: ipv4; IP address or CIDR (e.g. 192.168.1.0/26): 192.168.1.0/26; Prefix length (used when the address has no /prefix): 26.

Inputs

  • IP versionIPv4
  • IP address or CIDR (e.g. 192.168.1.0/26)192.168.1.0/26
  • Prefix length (used when the address has no /prefix)26

Result

  • Network address192.168.1.0
  • Broadcast address192.168.1.63
  • Subnet mask255.255.255.192
  • Wildcard mask0.0.0.63
  • Total addresses64
  • Usable hosts62
  • First usable host192.168.1.1
  • Last usable host192.168.1.62
  • CIDR notation192.168.1.0/26

Results explained

Network address
Network address from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
Broadcast address
Broadcast address from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
Subnet mask
Subnet mask from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
Wildcard mask
Wildcard mask from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
Total addresses
Total addresses from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
Usable hosts
Usable hosts from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
First usable host
First usable host from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
Last usable host
Last usable host from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.
CIDR notation
CIDR notation from the formula above. Classless CIDR math only — no whois, geolocation or live lookup. IPv4 /31 and /32 follow RFC 3021-style reporting (usable count floors at 0). IPv6 has no broadcast address; the last address of the range is reported instead.

Frequently asked questions

A /26 has 2^(32-26) = 64 addresses. Two are reserved (network and broadcast), leaving 62 usable host addresses, e.g. 192.168.1.1 to 192.168.1.62 in 192.168.1.0/26.

The network address is the first address of the block and identifies the subnet itself; the broadcast address is the last address and targets every host in the subnet. Neither is assigned to a device in a conventional subnet.

The bitwise inverse of the subnet mask: a /26 mask of 255.255.255.192 has wildcard 0.0.0.63. Wildcard masks are used in Cisco ACLs and OSPF network statements.

Yes. Switch the version to IPv6 and enter an address such as 2001:db8::/64. IPv6 math is done with BigInt, so totals like 2^64 are reported exactly as digit strings.

No. All subnet math runs locally in your browser with no network request, so private RFC 1918 addresses are safe to enter.

It splits your block into four equal subnets by borrowing two bits (prefix + 2) and lists each subnet's network, broadcast and usable range — the most common first step when carving up a block.