💻 Developer Tools

Subnet Calculator

Enter an IPv4 CIDR (e.g. 192.168.1.0/24) and get the network and broadcast address, usable host range, host count, subnet mask and wildcard all at once. For network design and study. Everything runs in your browser.

Examples (click to try)
Enter a CIDR to see the network details

How to use the subnet calculator

Press one of the "Examples (click to try)" chips, or type IP address / prefix length (e.g. 10.0.0.0/8). It calculates live as you type, filling the table with each network value. Use "Copy result" to export it as text.

Example: 192.168.1.0/24

Enter 192.168.1.0/24 and you get:

Subnet mask    : 255.255.255.0
Network        : 192.168.1.0
Broadcast      : 192.168.1.255
Host range     : 192.168.1.1 - 192.168.1.254
Usable hosts   : 254
  • Network address: IP AND mask — the first address of the subnet.
  • Broadcast address: the last address in the subnet, used for all-hosts traffic.
  • Host range: the addresses you can assign to devices (first = network + 1, last = broadcast - 1).
  • Usable hosts: normally "all addresses - 2". /31 is 2 and /32 is 1.
  • Wildcard mask: the bitwise inverse of the subnet mask, used in ACLs.

When it comes in handy

  • Quickly checking how many hosts a new subnet can hold, and its range
  • Mapping a CIDR to a dotted subnet mask (like 255.255.255.0) at a glance
  • Studying subnetting for a certification or networking course

To see binary or hex representations, pair it with the Number Base Converter.

FAQ

Is my IP address sent to any server?
No. All subnet calculation happens within your browser, and the IP address and CIDR you enter are never sent to or stored on any server.
How is the usable host count counted?
For a normal subnet, the usable host count is all addresses minus the network and broadcast addresses (e.g. /24 is 256 - 2 = 254). As exceptions, /31 is treated as 2 usable addresses for point-to-point links (RFC 3021), and /32 as a single host.
Is IPv6 supported?
Currently IPv4 only. IPv6 (prefix calculations like ::/64) is being considered for the future.