Skip to content
Website under migration: We are moving to a new design. Some pages may look different or load slowly for a few days. Thank you for your patience.
SwitchFirewall
IPv4 Detecting…
IPv6 Detecting…

Subnet Calculator

Last updated:
/24

Subnet Details

Use this subnet calculator for

How to use the subnet calculator

Type an IP address, then either enter a subnet mask or drag the CIDR slider. The mask and the CIDR stay in sync, and the table updates as you type. You can also paste an address with a prefix, such as 10.0.0.5/26, into the IP field.

/31 and /32 subnets

Small prefixes follow different rules, so the calculator shows a message when you select them.

Subnet size quick reference

CIDRSubnet mask · Total addresses · Usable hosts
/24255.255.255.0 · 256 · 254
/25255.255.255.128 · 128 · 126
/26255.255.255.192 · 64 · 62
/27255.255.255.224 · 32 · 30
/28255.255.255.240 · 16 · 14
/29255.255.255.248 · 8 · 6
/30255.255.255.252 · 4 · 2
/31255.255.255.254 · 2 · 2 (point-to-point)
/32255.255.255.255 · 1 · 1 (single host)

Need to split one network into different sizes? Use the VLSM Calculator.

Frequently asked questions

How do I calculate a subnet?

Enter the IP address, then type the subnet mask or move the CIDR slider. The calculator shows the network address, first and last usable IP, broadcast address and the number of hosts.

How many usable hosts are in a /24 network?

A /24 has 256 addresses and 254 usable hosts, because the first address is the network address and the last one is the broadcast address.

What is a /31 subnet?

A /31 has two addresses and no network or broadcast address. RFC 3021 allows both to be used, which makes /31 the usual choice for point-to-point router links.

What is a /32 subnet?

A /32 is a single IP address. It is used for loopback interfaces, host routes and firewall rules that match exactly one host.

What is a wildcard mask?

A wildcard mask is the inverse of the subnet mask. Cisco access lists and OSPF network statements use it. For 255.255.255.0 the wildcard mask is 0.0.0.255.