Skip to main content
Tools

Subnet Calculator

Enter an IPv4 CIDR or netmask to get the network, broadcast, usable range and host count, split subnets, and work with IPv6 prefixes.

Write 192.168.1.10/24 or 192.168.1.10 255.255.255.0

Results

CIDR
172.16.32.0/20
Network address
172.16.32.0
Broadcast address
172.16.47.255
First usable address
172.16.32.1
Last usable address
172.16.47.254
Usable hosts
4,094
Total addresses
4,096
Subnet mask
255.255.240.0 (/20)
Wildcard mask
0.0.15.255
Classful class
Class B
Address type
Private (172.16.0.0/12, RFC 1918)
Decimal integer
2886738811
Hex
0xAC10237B

Binary

The first 20 bits (bold) are the network part; the rest is the host part.

Address
10101100.00010000.00100011.01111011
Mask
11111111.11111111.11110000.00000000

Split into subnets

Split by

4 × /22, 1,024 addresses each (1,022 usable).

#SubnetUsable rangeBroadcast
1172.16.32.0/22172.16.32.1–172.16.35.254172.16.35.255
2172.16.36.0/22172.16.36.1–172.16.39.254172.16.39.255
3172.16.40.0/22172.16.40.1–172.16.43.254172.16.43.255
4172.16.44.0/22172.16.44.1–172.16.47.254172.16.47.255

How to use

  1. Choose IPv4 or IPv6.
  2. Enter an address and mask, such as 192.168.1.10/24 or 192.168.1.10 255.255.255.0, or enter only the address and pick the mask from the menu.
  3. The network, broadcast address, usable range, host count, wildcard mask, address type and binary view update instantly; copy any value or the whole summary.
  4. Under “Split into subnets”, choose how many subnets you need or a new prefix length to list every subnet’s range.
  5. For IPv6 you get the RFC 5952 compressed and expanded forms, the network range and the address count.

FAQ

Why does a /24 have 256 addresses but only 254 usable hosts?

The first address of a subnet is the network address and the last is the broadcast address; neither can be assigned to a host, so usable hosts are the total minus two. /31 and /32 are exceptions: per RFC 3021 a /31 serves a point-to-point link with both addresses usable, and a /32 is a single host.

Which IP addresses are private?

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. 100.64.0.0/10 is the shared space carriers use for CGNAT, 169.254.0.0/16 is link-local (used when automatic configuration fails), and 127.0.0.0/8 is loopback.

What is a wildcard mask?

It is the inverse of the subnet mask: the wildcard mask of 255.255.255.0 is 0.0.0.255. Cisco ACLs and OSPF configuration use this form.

Do classes A, B and C still matter?

Classful addressing was replaced by CIDR in 1993, and routing no longer derives the mask from the class. The class is still shown here because textbooks and exams use it.

Why can one IPv6 address be written in several ways?

Leading zeros in each group may be dropped, and one run of all-zero groups may be replaced by “::”. RFC 5952 defines a single recommended form: lowercase, no leading zeros, and the longest run of zero groups shortened to “::” (never a single zero group). The “Compressed” row uses that form, so it is easy to compare and record.

Is the address I enter sent anywhere?

No. Everything is calculated in your browser; nothing looks up DNS or connects to the address.

Keyboard shortcuts

/
Search tools (on a tool page, goes to the homepage search)
?
Show this help
Esc
Close a dialog
Ctrl / ⌘Enter
Run the tool's main action (where supported)

While you type in a text field, / and ? are typed as usual.