Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

Subnet Calculator

Enter an IPv4 address and mask to get the network and broadcast addresses, usable host range, host count, and wildcard mask.

Processed locally in your browser — nothing is uploaded.

Subnet Calculator

Enter an address and mask to see the subnet.

About Subnet Calculator

Give it any address inside a subnet plus the mask — as a prefix (/26) or in dotted form (255.255.255.192) — and it works out the network address, the broadcast address, the first and last usable host, and how many hosts the subnet holds.

The wildcard mask is included for ACLs and route maps, along with the address's traditional class and whether it falls in a private, loopback, link-local, or carrier-grade NAT range. The /31 and /32 edge cases follow RFC 3021 rather than blindly subtracting two.

Common uses

  • Work out the usable host range before assigning static addresses
  • Translate between a dotted netmask and a CIDR prefix
  • Get the wildcard mask for a firewall or router ACL

Example

Input

192.168.1.130 · /26

Output

Network 192.168.1.128 · Broadcast 192.168.1.191 · Hosts 192.168.1.129–192.168.1.190 (62)

Limitations

  • IPv4 only — IPv6 uses different arithmetic and has no broadcast address
  • Address class is legacy information; routing has been classless (CIDR) since the 1990s

Frequently asked questions

How many usable hosts does a /24 subnet have?

254. A /24 contains 256 addresses, but the first is the network address and the last is the broadcast address, leaving 254 for hosts (.1 through .254 in a block like 192.168.1.0/24).

Are the IP addresses I type into this calculator logged anywhere?

No. All the subnet math runs in your browser and nothing is transmitted or stored — internal addressing plans and network layouts stay on your device.

Why does a /31 show two usable hosts instead of zero?

RFC 3021 allows both addresses of a /31 to be used on point-to-point links, since no broadcast address is needed there. The classic total-minus-two formula would give zero, but real routers use /31s this way, so the calculator follows the RFC.

What is a wildcard mask used for?

It is the bitwise inverse of the subnet mask — /26 (255.255.255.192) has wildcard 0.0.0.63 — and it is the format Cisco ACLs and OSPF network statements expect, where 0 bits mean 'must match' and 1 bits mean 'don't care'.

Can I assign the network or broadcast address to a device?

No, not in subnets of /30 or larger. The all-zeros host address identifies the network itself and the all-ones address is the broadcast destination; assigning either to a device causes unreachable-host and duplicate-traffic problems.