NexaYori Tools Help
Help / Subnet calculator

Subnet calculator

A subnet calculator for IPv4 and IPv6: give it an address and a prefix or mask, get the network, mask, broadcast, usable host range and what kind of address space it is.

Open Subnet calculator →

How to use it

  1. Type an address with a prefix (10.0.0.0/22), with a mask (10.0.0.5 255.255.252.0), or an IPv6 prefix (2001:db8::/48).
  2. Press Calculate.

Reading the results

Network
The first address of the block, written with its prefix length.
Netmask / prefix
How much of the address identifies the network. /24 = 255.255.255.0.
Wildcard
The inverse of the mask, used by Cisco ACLs and OSPF.
Broadcast
The last address of an IPv4 block, used to reach every host on it. /31 and /32 have none.
Usable hosts
Addresses you can assign to devices: total minus network and broadcast (except /31, where both are usable).
Type
Private (RFC 1918), carrier-grade NAT, documentation, link-local, multicast or public.

Examples

From the command line

curl "https://tools.nexayori.com/subnet?q=192.168.1.0%2F24"
curl "https://tools.nexayori.com/subnet?q=192.168.1.0%2F24&format=json"
qAddress/prefix or “address mask”
formattext, json or html

Questions

Why does a /31 have 2 usable hosts?

Point-to-point links (RFC 3021) don’t need network or broadcast addresses, so both addresses are usable.

What’s a /64 for in IPv6?

It’s the standard size for one network segment. A /48 holds 65,536 of them.