PACKETRY BETA
All tools IPv4 Subnet Calculator

IPv4 Subnet Calculator

Enter a valid IPv4 CIDR block to calculate the subnet.

How it works

Enter an IPv4 address with prefix length in CIDR notation. The calculator determines the network address, broadcast address, usable host range, and host counts. Select a cloud provider to account for provider reserved addresses inside the subnet.

CIDR notation defines a subnet boundary by appending a prefix length after the address. In192.168.1.0/24the first 24 bits identify the network and the remaining 8 bits identify hosts. That is why a/24maps to the subnet mask255.255.255.0and produces 256 total addresses.

Subnet masks work by marking network bits with binary ones and host bits with binary zeros. The network address is found by zeroing the host bits, while the broadcast address is found by setting all host bits to one. The binary view above makes that split explicit so you can see exactly where the prefix boundary lands.

Cloud providers can reduce the usable address count because some IPv4 addresses are reserved for routers, gateways, DNS, and platform services. AWS and Azure reserve five addresses in a typical subnet, OCI reserves three, and GCP follows the standard two-address subtraction used for normal IPv4 subnetting.

Common subnet sizes

PrefixSubnet maskTotalUsable
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

FAQ

What is CIDR notation?

CIDR notation combines an IPv4 address with a prefix length, such as 192.168.1.0/24. The prefix tells you how many bits belong to the network portion and how many bits remain for hosts.

How many usable hosts are in a /24 subnet?

A /24 contains 256 total IPv4 addresses. In standard subnetting, 254 are usable because the network and broadcast addresses are reserved.

Why do cloud providers reserve addresses inside a subnet?

Cloud platforms reserve addresses for routing, gateway, DNS, and platform functions. That is why the cloud-aware usable host count can be lower than the standard IPv4 usable host count.