Skip to content
Dev

Subnet Calculator

This subnet calculator turns an IPv4 address plus a CIDR prefix or dotted netmask into the network, broadcast, usable host range, host count, and wildcard mask.

Four numbers from 0 to 255. You can paste CIDR notation such as 192.168.1.10/24.

Mask style

A /24 is 256 addresses and 254 usable hosts.

Subnet result

Address
192.168.1.10
CIDR
192.168.1.0/24
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Network
192.168.1.0
Broadcast
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Usable hosts
254 of 256

192.168.1.10 is in 192.168.1.0/24. Usable hosts run from 192.168.1.1 to 192.168.1.254 (254 of 256 addresses).

IPv4 only. The address stays in your browser and is not uploaded.

How to use

  1. Enter an IPv4 address, such as 192.168.1.10. You can paste CIDR notation such as 192.168.1.10/24.
  2. Choose a prefix from /0 to /32, or switch to a dotted subnet mask such as 255.255.255.0.
  3. Read the network, broadcast, usable host range, host counts, subnet mask, and wildcard mask. The math stays in your browser.

Formula

A prefix of n bits sets the first n bits of the mask to 1. Network = IP AND mask. Wildcard = the inverse of the mask. Broadcast = network OR wildcard. For /0 through /30, usable hosts are the addresses between network and broadcast. A /31 has two usable addresses. A /32 is a single host.

Example. 192.168.1.10/24 has mask 255.255.255.0, network 192.168.1.0, broadcast 192.168.1.255, usable hosts 192.168.1.1 to 192.168.1.254 (254 hosts), and wildcard mask 0.0.0.255.

Frequently asked questions

What is CIDR notation?

An IP plus a prefix length, such as 192.168.1.0/24, which means a 24-bit network mask (255.255.255.0).

How many hosts are in a /24?

256 addresses total. After reserving the network and broadcast addresses, 254 are usable hosts.

What is a wildcard mask?

The inverse of the subnet mask, often used in access control lists. For /24 it is 0.0.0.255.

Can I enter a dotted subnet mask instead of CIDR?

Yes. Switch to netmask and enter a contiguous mask such as 255.255.255.0. That is the same as /24. A mask with holes, such as 255.0.255.0, is rejected.

Does this support IPv6?

This version calculates IPv4 only.

Is my IP sent to a server?

No. Calculations run in your browser.