Skip to content
All

Subnet Calculator

Network and broadcast addresses, host range and host count for an IPv4 address with a prefix or subnet mask.

Your network

Filled in with example values. Replace them with your own.

24 or 255.255.255.0

Results update as you type.

Result

Network: 192.168.1.0/24

Network

192.168.1.0/24

254 usable host addresses out of 256.
192.168.1.10 is in 192.168.0.0/16: private network (RFC 1918).
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Network address
192.168.1.0
Broadcast address
192.168.1.255
Host range
192.168.1.1 – 192.168.1.254
Usable hosts
254
Total addresses
256

In binary

Address
11000000.10101000.00000001.00001010
Mask
11111111.11111111.11111111.00000000
Network
11000000.10101000.00000001.00000000

The first 24 bits are the network; the rest identify hosts.

How it’s calculated

  1. Network

    192.168.1.10 AND 255.255.255.0 = 192.168.1.0

  2. Broadcast

    192.168.1.0 OR 0.0.0.255 = 192.168.1.255

  3. Usable hosts

    2^(32 − 24) − 2 = 254

How the subnet calculator works

Enter an IPv4 address and either a prefix length (such as 24) or a subnet mask (such as 255.255.255.0). The calculator combines them bit by bit to find the network the address belongs to, its broadcast address, the range of host addresses and how many there are.

The formula

Network = Address AND Mask

Broadcast = Network OR Wildcard

Usable hosts = 2^(32 − Prefix) − 2

Worked examples

  • 192.168.1.10/24: network 192.168.1.0, broadcast 192.168.1.255, hosts 192.168.1.1 to 192.168.1.254, 254 usable. It is a private address (RFC 1918).
  • 10.20.30.40/20 (mask 255.255.240.0): each /20 spans 16 values of the third number, so the network is 10.20.16.0 and the broadcast 10.20.31.255, with 4,094 usable hosts.

Frequently asked questions

What does /24 mean?

It is CIDR notation: the first 24 of the 32 bits of the address identify the network, and the remaining 8 identify hosts. A /24 is the same as the mask 255.255.255.0 and contains 256 addresses.

Why are there 2 fewer usable hosts than addresses?

In a normal subnet the first address identifies the network itself and the last is the broadcast address, so neither is given to a device. The exceptions are /31 (two usable addresses on a point-to-point link, RFC 3021) and /32 (a single address).

What is a wildcard mask?

The subnet mask with every bit flipped: 255.255.255.0 becomes 0.0.0.255. Some router and firewall configurations use it instead of the subnet mask.

What are private addresses?

The ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are set aside by RFC 1918 for private networks and are not routed on the public internet. The calculator also recognises loopback, link-local, shared (carrier-grade NAT) and multicast addresses.

Does it work for IPv6?

Not yet. This calculator is for IPv4 addresses only.