Subnet calculator - Calculate IPv4, CIDR, and subnet masks
Calculate a network range and subnet details from IPv4 and CIDR
Results
Enter an IPv4 address and CIDR to see subnet details.
About this tool
- Calculate the network address, subnet mask, and IP address range from an IPv4 address and CIDR.
- See the total number of addresses and usable host range, including the /0 to /32 boundaries. /31 is handled according to RFC 3021, and /32 is treated as a host route.
- All calculations run in your browser. Your IP address and CIDR are not sent externally or stored.
How to use
Enter an IPv4 address and CIDR
Enter an IPv4 address followed by /0 through /32, such as 192.168.10.34/24.
Calculate the subnet
Select the button or press Enter to see network details for the address.
Copy a result
Select Copy for the network address, subnet mask, or another value you need.
Frequently asked questions
What is a subnet?
A subnet is a unit for dividing an IP address range into network and host portions. The CIDR prefix length indicates the size of the network portion.
What does /24 mean in CIDR?
It means the first 24 bits of the IPv4 address are the network portion. A /24 contains 256 total addresses.
What is the difference between a subnet mask and CIDR?
CIDR is a prefix length such as /24, while a subnet mask is written in IPv4 form, such as 255.255.255.0. This tool accepts CIDR notation as input.
What is a network address?
It is the first address in a subnet, calculated by setting the host portion of the input IP address to 0.
What is a broadcast address?
For a typical IPv4 subnet from /0 through /30, it is the last address in the subnet. A broadcast address is not defined for /31 or /32.
Why are there two fewer usable hosts than total addresses?
For prefixes from /0 through /30, the first address is reserved as the network address and the last as the broadcast address. /31 and /32 are handled as exceptions.
Why can both addresses in a /31 be used?
On point-to-point links, RFC 3021 allows both addresses in a /31 to be used as host addresses.
What is /32?
It is a host route representing a single IPv4 address. Both the total address count and usable host count are 1.
Does this tool support IPv6?
No. It currently supports IPv4 CIDR only.
Is my IP address sent externally?
No. Calculations run in your browser. The tool does not query external APIs or DNS, or store your input history.