CIDR Subnet Calculator

Calculate IPv4 and IPv6 subnet masks, network addresses, broadcast IPs, and usable host counts.

🔒 Client · Offline
Presets:

Check if one address is inside the subnet.

Check if the two blocks overlap or enclose each other.

Usable Hosts
254
Total Addresses
256
IP Class
Class C
Scope
Private

Network Address

192.168.1.0

Broadcast Address

192.168.1.255

Subnet Mask

255.255.255.0

Wildcard Mask

0.0.0.255

First Usable Host

192.168.1.1

Last Usable Host

192.168.1.254

IP in Binary

11000000.10101000.00000001.00000000

Mask in Binary

11111111.11111111.11111111.00000000

About CIDR and subnets

This tool reads a CIDR block such as 10.0.0.0/24 and gives the netmask, the network address, the broadcast address, the first and last usable address, and the host count.

The prefix length states how many bits name the network. A smaller number gives a larger block. A /24 holds 256 addresses and 254 usable hosts, because the network address and the broadcast address are reserved.

Use it to plan a VPC, to write a firewall rule, or to check that two subnets do not overlap.

The /31 point-to-point prefix

A /31 block holds two addresses. In a usual subnet, the first address is the network address and the last address is the broadcast address. A /31 has no space for these two addresses.

RFC 3021 gives a rule for this prefix. On a point-to-point link, the two addresses become two usable host addresses. One address goes to each end of the link. The link needs no broadcast address, because each packet has only one possible destination.

This tool applies the RFC 3021 rule. A /31 block shows two usable hosts. The tool never shows a negative host count.

The /32 host prefix

A /32 block holds one address. The mask is 255.255.255.255, and all 32 bits name the network. The network address, the broadcast address, the first host, and the last host are the same address.

Use a /32 for a host route, for a loopback interface on a router, or for a firewall rule that must match one server. The IPv6 equal of a /32 host route is a /128 block.

IPv6 blocks

Give an IPv6 block, such as 2001:db8::/48, and the tool shows the first address, the last address, and the address count. It shows each address in the short form and in the full form of 8 groups.

An IPv6 block has no broadcast address and no reserved last address. All addresses in the block are usable. A /64 is the usual size for one link, and a site usually gets a /48. The tool writes the address count in full digits, because a count such as the 18,446,744,073,709,551,616 addresses of a /64 is not correct in a short form.