IPv4 subnet calculator
Calculate IPv4 subnet information and CIDR ranges
Input
Results
Binary representation
TL;DR
What is IPv4 subnet calculator?
IPv4 subnetting divides a network address space into smaller, routable segments. A subnet is defined by an IP address and a prefix length (CIDR notation, e.g. 192.168.1.0/24), which together specify the network address, broadcast address, subnet mask, and the range of usable host addresses.
How it works
The prefix length (e.g. /24) indicates how many bits of the 32-bit IPv4 address are the network portion. The remaining bits identify hosts on that network. A /24 gives 256 addresses (254 usable; network and broadcast are reserved). A /25 halves the network, giving 128 addresses (126 usable).
Common use cases
- ‣Cloud networking: define VPC and subnet CIDR blocks in AWS, GCP, or Azure without overlap
- ‣Network planning: calculate whether two IP addresses are on the same subnet before configuring routing
- ‣Firewall rules: determine the correct CIDR block for a security group rule that covers a specific IP range
- ‣DHCP configuration: calculate the host range and broadcast address for a DHCP scope
Frequently asked questions
What is the difference between a network address and a host address?
The network address (all host bits set to 0) identifies the subnet itself and is not assignable to a host. The broadcast address (all host bits set to 1) sends to all hosts on the subnet and is also not assignable. All addresses between them are usable host addresses.
What are the private IPv4 address ranges?
RFC 1918 defines three private ranges not routed on the public internet: 10.0.0.0/8 (10.x.x.x), 172.16.0.0/12 (172.16.x.x to 172.31.x.x), and 192.168.0.0/16 (192.168.x.x). These are used for internal networks, VPCs, and home routers.