Subnet calculator

Type an IPv4 address with a /prefix or subnet mask to get the network, broadcast address, usable host range, number of hosts and wildcard mask.

Your files stay on your device. Nothing is uploaded.

Subnet calculator

IPv4

Step 1: Type an IP address and prefix

Examples: 10.0.0.5/16, 172.16.4.20 255.255.252.0

Step 2: The network

In binary (network part in colour)

How to calculate a subnet

  1. Type the address

    Type an address with a prefix, like 192.168.1.10/24, or with a mask, like 192.168.1.10 255.255.255.0.

  2. Read the network

    The network, broadcast, first and last usable address and host count appear as you type.

  3. Copy any value

    Copy a value for your router, firewall or cloud network settings.

About this tool

CIDR in one line

The prefix (/24) is how many bits belong to the network. The rest are for hosts: a /24 has 8 host bits, so 256 addresses, 254 of them usable, because the first is the network and the last is the broadcast address.

/31 and /32

A /32 is a single address. A /31 is a point-to-point link where both addresses are usable (RFC 3021). Neither has a broadcast address, and the calculator handles both correctly.

Private or public?

The tool says whether the address is private (10.x, 172.16-31.x, 192.168.x), loopback, link-local, carrier-grade NAT or public.

Privacy

This tool runs in your browser, on your own device. Your files and text are not uploaded to our server and we cannot see them. When you close or reload this tab, they are cleared, along with the results.

Frequently asked questions

What is a wildcard mask?

The opposite of the subnet mask (0.0.0.255 for /24). Cisco access lists and OSPF use it.

Does it support IPv6?

Not yet; this calculator is for IPv4.

Is anything sent to a server?

No. It runs in your browser, so nothing you type or choose is sent anywhere.

How do I convert an address to binary?

The binary form is shown under the results, with the network bits in colour. For other numbers, use the Number base converter.