Skip to content
Free Tool Arena

Developer Utilities · Free tool

Subnet / CIDR Calculator

Calculate IPv4 subnets from CIDR or dotted mask: network, broadcast, host range, usable hosts, wildcard, binary. Free, browser-only.

Updated May 2026

Network

192.168.1.0/24

Class C (legacy) · private

Network address

192.168.1.0

Broadcast address

192.168.1.255

First usable host

192.168.1.1

Last usable host

192.168.1.254

Subnet mask

255.255.255.0

Wildcard mask

0.0.0.255

Total addresses

256

Usable hosts

254

Show binary representation

Network:11000000.10101000.00000001.00000000

Netmask:11111111.11111111.11111111.00000000

Found this useful?Email

Advertisement

What it does

A subnet calculator turns an IP + prefix into the network address, broadcast, host range, mask, and host count. The math is mechanical — every network engineer can do it on paper — but doing it 30 times a day during firewall config or VPN routing eats time. This tool is the calculator next to your terminal.

Accepts CIDR (192.168.1.0/24), IP + dotted mask (10.0.0.0 255.255.0.0), or a bare IP (treated as /32 host route). Computes everything in your browser via plain JavaScript bitwise operations on 32-bit unsigned integers — no library, no server call, no analytics. Recognizes RFC 1918 private ranges, RFC 5737 documentation ranges, RFC 3927 link-local, classful legacy info, plus the /31 point-to-point convention from RFC 3021 and the /32 host-route case.

Embed this tool on your siteShow snippet

Paste this snippet into any page. Loads on-demand (lazy), no tracking scripts, and sized to most dashboards. Replace the height to fit your layout.

<iframe src="https://freetoolarena.com/embed/subnet-calculator" width="100%" height="720" frameborder="0" loading="lazy" title="Subnet / CIDR Calculator" style="border:1px solid #e2e8f0;border-radius:12px;max-width:720px;"></iframe>
Embed docs →

Example input & output

Input

192.168.1.50/26

Output

Network: 192.168.1.0
Broadcast: 192.168.1.63
First host: 192.168.1.1
Last host: 192.168.1.62
Subnet mask: 255.255.255.192
Usable hosts: 62

The host bits in the input (192.168.1.50) get cleared to find the network address. /26 = 6 host bits = 64 addresses, 62 usable.

How to use it

  1. Enter an IP and prefix (e.g. 192.168.1.0/24) or click a preset.
  2. Read off the network address, broadcast, host range, and mask.
  3. Click Copy on any field to copy that value to your clipboard.
  4. Expand 'Show binary representation' if you need to see the bit-level layout.

How it works

Three core bitwise operations, all done on unsigned 32-bit integers:

  • Network address: ip AND netmask — the host bits get zeroed out.
  • Broadcast address: network OR wildcard — the host bits get set to all-ones.
  • Wildcard mask: NOT netmask — the inverted mask, used in ACLs and OSPF.

Special cases: /31 is a point-to-point link (RFC 3021) where both addresses are usable hosts and there's no broadcast; /32 is a host route — exactly one address. /0 is the entire IPv4 space.

When to use this tool

  • Configuring firewall rules: you have an IP and need to allow / deny the whole subnet.
  • Setting up VPN routes: convert a CIDR to its mask form (or vice versa) for OS routing tables.
  • Designing a new VLAN / subnet: figure out how many hosts a /28 vs /27 vs /26 actually buys you.
  • Troubleshooting reachability: 'is 10.5.7.42 part of 10.5.0.0/16?' — yes; the network address resolves to 10.5.0.0 either way.

When not to use it

  • IPv6 addresses — this is IPv4-only. Use a dedicated IPv6 calculator for /64 / /48 / /128 work.
  • Variable-Length Subnet Masking design tables — this calculates one subnet at a time, not a hierarchical division.

Frequently asked questions

What's the difference between /24 and 255.255.255.0?
Same thing, two notations. /24 means '24 leading 1 bits in the mask' which translates to 11111111.11111111.11111111.00000000 = 255.255.255.0. CIDR notation is just a more compact way to write masks.
Why /31 only has 2 hosts (not 0)?
RFC 3021 (2000) redefined /31 for point-to-point links. Both addresses are usable hosts; there's no separate network or broadcast. Useful for router-to-router links because /30 wastes 2 of every 4 addresses on network + broadcast.
Is 192.168.1.0 always a network address?
Only when paired with a mask of /24 or wider. 192.168.1.0/25 has TWO subnets: 192.168.1.0/25 (first half) and 192.168.1.128/25 (second half). Always check the prefix.
What's a wildcard mask vs subnet mask?
Inverted bits. Subnet mask 255.255.255.0 = wildcard 0.0.0.255. Cisco ACLs and OSPF use wildcard form; routing tables use subnet form. Same information, different convention.
Does this support IPv6?
No — IPv4 only. IPv6 has different mechanics (no broadcast, /64 default for LANs, hex notation) so it deserves a dedicated tool.

Advertisement

Learn more

Explore more developer utilities tools

100% in-browserNo downloadsNo sign-upMalware-freeHow we keep this safe →