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
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The host count already subtracts the network and broadcast addresses for prefixes up to /30, while /31 shows 2 and /32 shows 1 for point-to-point links and single hosts. Some cloud platforms reserve extra addresses in every subnet, so check their documentation before sizing a network to the last host. The tool handles IPv4 only. Would you like IPv6 prefixes supported, and for what kind of work?