Skip to main content
chain
⊞
IPv4 Subnet Calculator
PREFIX REFERENCE
Prefix Netmask Addresses
// about this tool

IPv4 Subnet Calculator Online

Updated 2026-10-24

Calculate an IPv4 subnet online for free. Type an address in CIDR form, or a plain IP and netmask, and SnapTools works out the network address, broadcast address, and usable host range at once. Everything happens in your browser, so the addressing you paste in stays on your machine.

A /31 correctly reports two usable hosts rather than zero: RFC 3021 allows point-to-point links where the usual minus-two rule for the network and broadcast addresses doesn't apply, a case a lot of subnet calculators get wrong.

// how to use

  1. 1 Type an address in CIDR form, like 192.168.1.130/26. A plain IP and netmask works too.
  2. 2 Read the network, broadcast and host range off the four cards at the top.
  3. 3 Click any row in the prefix reference to see that subnet size worked out.

// examples

A /26 inside a home network
Input
192.168.1.130/26
Output
Network 192.168.1.128, broadcast 192.168.1.191, hosts .129 to .190, 62 usable
IP and netmask instead of a prefix
Input
172.16.5.1 255.255.0.0
Output
Recognised as /16; the mask is converted for you
A point-to-point link
Input
203.0.113.7/31
Output
Two usable addresses, no broadcast, under RFC 3021, where the usual minus-two does not apply

// common uses

Splitting an office or VPC network into subnets Working out whether two addresses are on the same network Converting between a netmask and a prefix length for a router config Getting the wildcard mask for a Cisco ACL

// faq

Why does a /31 show two usable hosts instead of zero?
Because RFC 3021 allows a /31 on point-to-point links, where both addresses are usable and there is no broadcast. The familiar "total minus two" rule assumes a network and a broadcast address exist, which is not true at /31 or /32. Many calculators report 0 usable hosts here, which would tell you a perfectly valid link config is impossible.
What is the wildcard mask for?
It is the netmask inverted, and it is what Cisco ACLs and OSPF take instead of a netmask. A /24 has a netmask of 255.255.255.0 and a wildcard of 0.0.0.255.
Why show the binary?
Because the mask only really makes sense in binary. You can see exactly where the network part stops and the host part begins. Once you have seen /26 as twenty-six 1 bits followed by six 0 bits, the arithmetic stops being magic.
What counts as a private address?
The RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), plus loopback, link-local (169.254.x.x) and carrier-grade NAT (100.64.0.0/10). The scope badge names which one you are in, which is usually enough to explain why something is not reachable.
Is anything sent to a server?
No. The calculation happens in your browser, so internal addressing you paste in stays on your machine.

Use this via API

Get a free API key →
curl -X POST https://thesnaptools.com/api/v1/tools/ipv4-subnet \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cidr":"192.168.1.130/26"}'