Calculate network address, broadcast address, usable host range, and subnet mask from an IPv4 address and CIDR prefix.
A /30 prefix means the first 30 bits of the 32-bit IPv4 address identify the network, leaving 2 bits (4 addresses) for hosts. The subnet mask marks those network bits as 1s. Applying the mask to your IP address with a bitwise AND gives the network address; flipping the mask and ORing it in gives the broadcast address.
The first address in a subnet is reserved as the network address and the last is reserved as the broadcast address, so neither can be assigned to a device. /31 and /32 are special cases used for point-to-point links and single-host routes, where this reservation doesn't apply the same way.
They're two ways of expressing the same thing — 255.255.255.0 and /24 both mean the first 24 bits are the network portion. CIDR notation is just more compact.
Not currently — this calculator covers IPv4 addressing and subnetting only.
Pick another tool to jump straight to it.