IPv4 Subnet Calculator

Find the IPv4 network, usable addresses, and masks from a prefix or dotted mask.

Calculate an IPv4 subnet

Example: 192.168.1.42

Use /0 through /32, or a dotted mask such as 255.255.255.0.

How the address ranges work

A /24 includes 256 addresses. The network and broadcast addresses occupy the endpoints, leaving 254 host slots. The wildcard mask inverts the subnet mask.

For a /31 point-to-point link, both addresses are usable under RFC 3021. A /32 represents one address. Neither case has a separate broadcast address.

Special-purpose addresses and routing rules can limit assignment, especially for broad ranges such as /0. This tool covers IPv4.