Skip to content
hateitall

Subnet Calculator

Get every number for an IPv4 subnet, exactly, from one address and prefix.

Processed locallyIn: IP address, CIDROut: Report

Loading tool…

How to use subnet calculator

  1. Type an address with a prefix, such as 192.168.10.37/26, or with a dotted mask.

  2. Drag the prefix slider to compare sizes.

  3. Read the network, broadcast, masks, host range and counts, and copy any value.

What this tool does

  • Accepts /prefix, dotted netmasks and bare addresses, and recognises a wildcard mask typed by mistake.
  • Handles /31 point-to-point links (RFC 3021) and /32 host routes correctly.
  • Labels private, loopback, link-local, CGNAT, documentation and multicast ranges.
  • Shows the address, mask, network and broadcast in binary with network bits highlighted.

How the result is verified

All maths uses exact integer arithmetic, and results were compared with Python's ipaddress module on hundreds of random networks during development.

Frequently asked questions

How many usable hosts are in a /24?

254. A /24 has 256 addresses; the first is the network address and the last is the broadcast address, so neither can be given to a host.

What is a wildcard mask?

The inverse of the netmask, used by Cisco access lists and OSPF. For 255.255.255.0 it is 0.0.0.255.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Divide an IPv4 or IPv6 network into equal smaller subnets

CIDR→ CSVLight on device

The smallest set of CIDR blocks that covers an address range

IP address→ CIDRLight on device

Compress, expand and analyse IPv6 addresses and prefixes

IP address · CIDR→ ReportLight on device

IPv4 as integer, hex, binary and IPv4-mapped IPv6, in both directions

IP address · Number→ ReportLight on device