Loona Automation logoLoona Developer Tools
Home › Developer Tools › IP Subnet Calculator

IP Subnet Calculator - Network, Broadcast and Hosts From Any CIDR

In short: the IP Subnet Calculator takes an IPv4 address in CIDR form and returns the network and broadcast addresses, netmask and wildcard mask, first and last usable host, total and usable host counts, IP class and private-range check - plus a view that splits the network into smaller subnets.

Subnetting by hand is where off-by-one errors live. Enter an address like 192.168.1.10/24 and get every field, checked the bitwise way.

Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the IP Subnet Calculator

  1. Type an IPv4 address with its prefix, e.g. 192.168.1.10/24.
  2. Click Calculate subnet to see all fields.
  3. To split: enter a larger prefix (e.g. 26) and click Show split view.
  4. Each resulting subnet is listed with its hosts and broadcast.

How it works

The calculator converts the address to a 32-bit integer and applies the netmask derived from the prefix: network = address AND mask, broadcast = network OR the wildcard (inverted) mask. Usable hosts are 2^(32-prefix) − 2 for normal prefixes, because the network and broadcast addresses are reserved; for /31 and /32 the usable count is shown as 0 in classic terms (point-to-point /31 links are the RFC 3021 exception, and a /32 is a single host route). The split view divides the network into equal subnets of the requested prefix - a /24 split at /26 gives exactly 4 subnets of 64 addresses each. Private-range detection covers 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.

Worked example

192.168.1.10/24 → network 192.168.1.0, broadcast 192.168.1.255, hosts 192.168.1.1 to 192.168.1.254 (254 usable).

Frequently Asked Questions

Is this calculator free?

Yes - completely free, no sign-up.

Why are usable hosts 2 fewer than total?

The first address names the network itself and the last is the broadcast address; neither can be assigned to a host on a normal subnet.

What about /31 and /32?

A /32 is a single address (a host route). A /31 has 2 addresses and no spare hosts in classic subnetting, though RFC 3021 allows both to be used on point-to-point links.

Does it support IPv6?

This calculator is IPv4-only, honestly scoped - IPv6 subnetting follows different conventions (no broadcast, /64 standard subnets).

Is anything uploaded?

No. All arithmetic runs in your browser.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.