Subnet Calculator Free

Subnet Calculator

A subnet calculator turns 192.168.1.0/24 into its network address 192.168.1.0, broadcast address 192.168.1.255, mask 255.255.255.0 and 254 usable hosts. Enter any IP address with a prefix or mask below to get the same details, plus the wildcard mask, the host range and a binary view.

Subnet calculator

Network address
192.168.1.0
Network (CIDR)
192.168.1.0/24
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Total addresses
256
Usable hosts
254
Address type
Private (RFC 1918)
Binary: address
11000000.10101000.00000001.00000000
Binary: mask
11111111.11111111.11111111.00000000

Bold underlined bits are the network part.

Usable hosts = 2^(32 - prefix) - 2, except /31 (2) and /32 (1). Network = address AND mask. Broadcast = network OR wildcard.

2^(32 - 24) = 256 total, 256 - 2 = 254 usable

Last updated

How to use the subnet calculator

  1. Type an IPv4 address with a prefix, such as 192.168.1.0/24, or pick the prefix or mask from the lists.
  2. Read the network address, broadcast address, subnet mask and wildcard mask.
  3. Check the first and last usable host and the number of usable hosts.
  4. Copy one value, copy the whole result, or print the page.

What each result means

A subnet breakdown lists the values below for one network.

Network address
The first address in the subnet. It names the subnet itself and is not given to a device.
Broadcast address
The last address in the subnet. A packet sent to it reaches every host in the subnet.
Subnet mask
A pattern of ones followed by zeros that marks the network part of an address. A /24 is 255.255.255.0.
Wildcard mask
The subnet mask turned inside out: ones become zeros and zeros become ones. A /24 gives 0.0.0.255. To convert a prefix or mask to a wildcard mask and back, use the wildcard mask calculator.
First and last usable host
The addresses between the network and broadcast addresses, which you can give to devices.
Usable hosts
The count of those addresses: the total minus 2, except /31 (2) and /32 (1).
Address type
What kind of address you typed, such as private, public, loopback or multicast.

Common subnet sizes

These seven sizes cover most small networks. For every prefix from /0 to /32, see the subnet mask cheat sheet.

Common subnet sizes
PrefixSubnet maskTotal addressesUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

Subnet mask and CIDR notation

A /24 is 255.255.255.0: the number after the slash counts the one bits at the start of the mask. To see the first address, last address and size of any block, use the CIDR calculator.

Private, public and special addresses

The Address type row describes the address you typed, not the whole block. The three private blocks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). The first matching row below is used.

Address types the calculator shows
BlockAddress type
10.0.0.0/8Private (RFC 1918)
172.16.0.0/12Private (RFC 1918)
192.168.0.0/16Private (RFC 1918)
100.64.0.0/10Shared / CGNAT (RFC 6598)
127.0.0.0/8Loopback
169.254.0.0/16Link-local
0.0.0.0/8"This network" (0.0.0.0/8)
192.0.2.0/24Documentation (RFC 5737)
198.51.100.0/24Documentation (RFC 5737)
203.0.113.0/24Documentation (RFC 5737)
224.0.0.0/4Multicast
255.255.255.255/32Limited broadcast
240.0.0.0/4Reserved (240.0.0.0/4)
Anything elsePublic

To test a single address, use the private IP address ranges checker.

Point-to-point links: /31 and /32

A /31 has two addresses and both are usable, so it suits a link between two devices. It has no network or broadcast address, and the Broadcast address row reads none (/31 point-to-point link). For example, 10.1.1.0/31 gives the hosts 10.1.1.0 and 10.1.1.1.

A /32 is a single address. It has 1 usable host and the Broadcast address row reads none (single host /32). For example, 10.1.1.5/32 is the one host 10.1.1.5.

Split a network into smaller subnets

A longer prefix cuts a network into smaller subnets. A 192.168.1.0/24 splits into two /25 networks, four /26 networks or eight /27 networks, and each one has its own network address and broadcast address.

Frequently asked questions

How do you calculate a subnet from an IP address and mask?

Write the address and mask in binary and AND them: the result is the network address. For 192.168.1.130/26 the network is 192.168.1.128, the broadcast is 192.168.1.191, and the usable hosts run from 192.168.1.129 to 192.168.1.190. The calculator above does the steps instantly and shows the binary view.

What is the difference between the network address and the broadcast address?

The network address is the first address in a subnet and names the subnet itself. The broadcast address is the last address and reaches every host in it. Neither is given to a device. In 192.168.1.0/24 they are 192.168.1.0 and 192.168.1.255, which leaves 254 usable hosts between them.

What happens if I enter a host address instead of a network address?

The calculator never rejects it. It clears the host bits and shows the network. Enter 192.168.1.130/26 and it tells you that you entered a host address and the network is 192.168.1.128/26, with 64 total addresses and 62 usable hosts. Enter 192.168.1.10/27 and the network is 192.168.1.0/27.

What is a /31 subnet used for?

A /31 is used for point-to-point links between two devices, as RFC 3021 allows. It has 2 addresses and both are usable, with no network or broadcast address. For example, 10.1.1.0/31 gives hosts 10.1.1.0 and 10.1.1.1. A /30 for the same job wastes two addresses: it has 4 addresses and only 2 usable hosts.

Can I type a subnet mask instead of a prefix length?

Yes. Type 192.168.1.10 255.255.255.224 or 192.168.1.10/255.255.255.224, or pick the mask from the list, and the prefix updates to /27. The result is 192.168.1.0/27 with 30 usable hosts. A mask that is not one run of ones followed by zeros, such as 255.0.255.0, is rejected with a message.

How can I tell if an address is private or public?

Read the Address type row, which describes the address you entered. For 192.168.1.0/24 it shows Private (RFC 1918), for 8.8.8.8/24 it shows Public, and for 0.0.0.0/0 it shows "This network". The three private blocks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The private ranges page has a checker for any single address.