IP subnet calculator

Type an IP address with its prefix (192.168.1.10/24) or its mask and get the network, broadcast, wildcard and usable range, and how many hosts fit. IPv6 prefixes are supported too.

  • Free
  • No sign-up
  • Runs in your browser
ip-subnet-calculator

Fill in the values above to see the result.

100% private — the calculation is done in your browser and nothing is sent to any server.

How it works

Type the address

With a prefix like /24, or with a mask like 255.255.255.0.

Read the network

Network, mask, broadcast, and the first and last usable addresses.

Copy what you need

Each value has a copy button.

Subnetting without the mental arithmetic

Anyone who configures a router, writes a firewall rule, sets up a cloud network or studies for a networking exam ends up asking the same question: given this address and this prefix, what is the network, where does it end and how many devices fit? The answer comes from binary arithmetic that is easy to get wrong by hand. This calculator does it instantly and shows the result in the forms you will need.

What you get for an IPv4 address

  • Network address: the first address of the block, with the prefix length.
  • Subnet mask: the dotted form of the prefix, such as 255.255.255.0 for /24.
  • Wildcard mask: the inverse of the mask, used in access lists and routing protocols on some systems.
  • Broadcast address: the last address, used to reach every device in the network.
  • Usable range and number of hosts: the addresses you can actually assign to devices, which are all but the network and broadcast addresses. For /31 and /32 the special rules for point-to-point links and single hosts are applied.
  • Type of address: whether it is private (10.x, 172.16-31.x, 192.168.x), loopback, link-local, multicast, reserved or public, plus the historical class and the address in binary.

CIDR and masks

CIDR notation writes the network as an address and the number of leading bits that identify it: 192.168.1.0/24 means the first 24 bits are the network. Older documents write the same thing as a mask. You can enter either, and the calculator checks that a mask is valid, that is, made of ones followed by zeros.

IPv6

For IPv6 you enter an address with a prefix, such as 2001:db8::/32. The tool shows the first and last address of the block and how many addresses it holds, a number that quickly becomes astronomical. IPv6 does not use broadcast or masks in the dotted form.

What it does not do

It does not split a network into several subnets automatically, does not check whether an address is in use, and does not look up who owns it. It calculates from the numbers you type, in your browser. To read the parts of a web address, use the URL parser.

Frequently asked questions

How do I calculate the network address from an IP and a mask?
Type the IP with its prefix or mask. The network address is the result of combining the address with the mask bit by bit, and it is shown directly.
How many hosts fit in a /24?
254 usable hosts: 256 addresses minus the network and broadcast addresses.
What is a wildcard mask?
The inverse of the subnet mask. Where the mask has ones, the wildcard has zeros, and it is used in some access lists and routing configurations.
What is the difference between /31 and /32?
A /31 has two addresses and is used for point-to-point links. A /32 is a single host address.
Does it support IPv6?
Yes. Enter an address with a prefix such as 2001:db8::/32 and you get the first and last address and the size of the block.
Is my data sent anywhere?
No. Everything is calculated in your browser.