Subnet calculator

Find an IPv4 network, subnet mask and usable address range.

Network / CIDR

192.168.1.0/24

Network address
192.168.1.0
Subnet mask
255.255.255.0
Broadcast address
192.168.1.255
First usable address
192.168.1.1
Last usable address
192.168.1.254
Total addresses
256
Usable addresses
254
Wildcard mask
0.0.0.255
Show binary addresses
IP address
11000000.10101000.00000001.00001010
Subnet mask
11111111.11111111.11111111.00000000
Network address
11000000.10101000.00000001.00000000

Find the network
behind an address.

This free IPv4 subnet calculator turns an IP address and a subnet mask into the network details you need. Enter an address such as 192.168.1.10, then choose a CIDR prefix such as /24 or enter a dotted mask such as 255.255.255.0. Select Calculate subnet to see the network address, broadcast address, host range and address counts.

Use an address with a CIDR prefix

You can also paste a complete address such as 192.168.1.10/24 into the IP address field. The prefix attached to the address takes priority. After calculation, the two fields show the address and prefix separately so you can change either one.

Subnet mask and wildcard mask

The subnet mask separates the network portion of an IPv4 address from its host portion. In a /24 network, the mask is 255.255.255.0. Its inverse, the wildcard mask, is 0.0.0.255. The calculator accepts only contiguous subnet masks: network bits followed by host bits.

Copy the result you need

Copy the network in CIDR notation, or copy all details as a text report. Expand the binary view to compare the address, mask and network one bit at a time.

CIDR, with the
numbers explained.

An IPv4 address has 32 bits. A /24 prefix uses 24 for the network and leaves eight for addresses within that network. The address count is 2 raised to the number of remaining bits: 28 = 256.

A /24 example

For 192.168.1.10/24, the network is 192.168.1.0 and the broadcast address is 192.168.1.255. The usual usable range runs from 192.168.1.1 to 192.168.1.254, giving 254 host addresses. This count reserves the network and broadcast addresses.

Why /31 and /32 are different

A /31 point-to-point link uses both addresses as endpoints, so the calculator shows two usable addresses and no directed broadcast. A /32 identifies a single address, commonly used for a host route. These special cases are shown explicitly instead of subtracting two from every address block. The /31 convention is described in RFC 3021.

Address counts are not availability checks

The result describes an address block. It does not discover devices, check which addresses are in use, or decide which addresses your router can assign. Reservations and network configuration can reduce the addresses available in practice.

Good questions.
Straight answers.

How do I calculate a subnet from an IP address?

Enter the IPv4 address and its CIDR prefix or subnet mask, then select Calculate subnet. An IP address alone does not specify the size of its network; the prefix or mask is needed too.

What is the difference between /24 and 255.255.255.0?

They describe the same mask. /24 is CIDR notation for 24 network bits, while 255.255.255.0 writes those bits as four decimal numbers.

How many usable hosts are in a /26 subnet?

A /26 contains 64 addresses. Under the usual network and broadcast reservations, 62 are usable host addresses.

Does this calculator support IPv6?

This tool calculates IPv4 subnets only. IPv6 addresses use a different address format and are not accepted here.

Is this subnet calculator free?

Yes. Calculate networks and copy the results without an account or payment.

All tools Temporary emailJSON to CSV