IP Subnet Calculator
Find subnet details from a CIDR prefix.
Result
How it is calculated
An IPv4 address has 32 bits, and the CIDR prefix /p says how many of the leading bits identify the network. total addresses = 2(32 − p). usable hosts = total − 2, because the first address is the network address and the last is the broadcast address; for /31 and /32 (two or fewer addresses) the tool shows the total itself. The netmask is p ones followed by zeros written in dotted decimal, and the wildcard mask is its bitwise inverse, as used in access lists. The prefix must be 0 to 32 and is rounded to a whole number.
Worked example
Prefix /24. Host bits = 32 − 24 = 8, so total addresses = 28 = 256. Usable hosts = 256 − 2 = 254. The mask has 24 ones: 255.255.255.0. The wildcard is the inverse, 0.0.0.255.
Common mistakes
- Counting all 256 addresses as usable hosts; the network and broadcast addresses cannot be given to devices in a normal subnet.
- Confusing the netmask with the wildcard mask in ACLs, where Cisco-style syntax expects the wildcard.
- Entering the netmask (255.255.255.0) instead of the prefix length (24).
- Assuming a /31 has zero usable hosts; point-to-point links use both addresses, and this tool reports 2.
- Forgetting that the tool takes only the prefix; it does not compute the network address of a specific host IP.
About this calculator
This calculator turns a CIDR prefix (like /24) into full subnet details: the subnet mask (e.g. /24 → 255.255.255.0), the wildcard mask (its bitwise inverse, used in access-control-list rules), the total address count (2 raised to the power of the remaining host bits), and the usable host count, which subtracts two addresses reserved for the network address and the broadcast address. A /24 network, for instance, has 256 total addresses but only 254 usable for hosts.
Network engineers and system administrators use this daily when designing IP address schemes, splitting a larger network into smaller subnets (subnetting) or combining several into one (supernetting/CIDR aggregation), and configuring VLANs and firewall rules; students preparing for certifications like CompTIA Network+ or Cisco's CCNA rely on it to check subnetting practice problems; and cloud engineers use the same math to plan VPC and subnet address ranges.
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 usable host count shown is the classic network-minus-two figure, but some cloud providers reserve more. AWS holds back five addresses in every subnet, so a /28 that shows 14 usable here leaves 11 in practice. Check your provider's documentation before sizing a VPC. The tool takes only the prefix and does not locate a particular host. Which environment are you planning, cloud or on-premises?