IP Subnet Calculator

Enter an IPv4 address and choose a prefix like /24. You get the network and broadcast addresses, subnet mask, wildcard mask and usable host range. 192.168.1.130/24 is in network 192.168.1.0 with 254 usable hosts.

By Mustansar Iqbal Khan, independent developerUpdated

IP Subnet Calculator

Result

Working it out…

CIDR cheat sheet

CIDRSubnet maskUsable hosts
/30255.255.255.2522
/29255.255.255.2486
/28255.255.255.24014
/27255.255.255.22430
/26255.255.255.19262
/25255.255.255.128126
/24255.255.255.0254
/16255.255.0.065,534

How is the network address found?

The IP address is ANDed with the subnet mask bit by bit. The broadcast address sets all host bits to 1.

Usable hosts = 2^(32 − prefix) − 2

Frequently asked questions

What are private IP ranges?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918).

Why subtract 2 hosts?

The network and broadcast addresses can't be assigned to devices. /31 point-to-point links are the exception.

Does it support IPv6?

Not yet. It covers IPv4.