CIDR / Subnet Calculator
Work out subnet details from CIDR notation.
Result
How it is calculated
A CIDR prefix p says how many of the 32 bits of an IPv4 address belong to the network. The netmask has p ones followed by 32 - p zeros, the network address is IP AND mask, and the broadcast address is the network address with all host bits set to 1. Usable hosts = 2^(32 - p) - 2, because the network and broadcast addresses cannot be assigned to devices. The exceptions are /31, shown as 2 hosts, and /32, shown as 1. The IP must be a valid dotted IPv4 address and the prefix a whole number from 0 to 32; IPv6 is not supported.
Worked example
Take 192.168.10.77/26. A /26 has 26 network bits, so the mask is 255.255.255.192 and the host part is 6 bits. Blocks are 2^6 = 64 addresses long. The last octet 77 falls in the block starting at 64, so the network is 192.168.10.64 and the broadcast is 64 + 63 = 127, giving 192.168.10.127. Usable hosts = 64 - 2 = 62, from .65 to .126.
Common mistakes
- Counting all 2^(32-p) addresses as usable hosts, forgetting the network and broadcast addresses.
- Entering the prefix with a slash or the netmask (255.255.255.0) in the prefix field. It takes only the number, such as 24.
- Assuming the entered IP is the network address. The tool derives the network from it.
- Entering an IPv6 address, which this tool does not handle.
About this calculator
Given an IP address and a CIDR prefix (like /24), this calculator derives the subnet mask, the network and broadcast addresses, and the usable host count using 2^(32−prefix) − 2, since the first address is reserved for the network and the last for broadcast.
It's used by network administrators planning IP address allocation, students studying for CCNA or other networking certifications who need to practice subnetting by hand, and cloud engineers sizing VPC or subnet ranges in AWS, Azure or GCP before deployment.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)