Subnet Count Calculator
Count subnets within a CIDR block.
Result
How it is calculated
For an IPv4 block written in CIDR notation, the prefix length is the number of fixed network bits out of 32. Splitting a parent /n into children /m gives subnets = 2m − n. Each child has 232 − m addresses, which is the figure shown as hosts each.
The prefix values are rounded to whole numbers. The child prefix must be at least as long as the parent and no larger than 32, and the parent cannot be negative; otherwise no result is shown. The hosts figure counts all addresses in the child block. In ordinary IPv4 subnets the network and broadcast addresses are not assignable, so usable hosts are 2 fewer (for /31 and /32 special rules apply).
Worked example
Parent /16, children /24. Subnets = 224 − 16 = 28 = 256. Addresses per child = 232 − 24 = 28 = 256. The tool shows 256 subnets with 256 addresses each, which means 254 usable host addresses per /24.
Common mistakes
- Treating the shown host figure as usable hosts; subtract 2 for the network and broadcast addresses in regular subnets.
- Swapping the fields: a longer prefix means a smaller block, so the child must have the larger number.
- Entering a netmask such as 255.255.255.0 instead of the prefix length 24.
- Assuming subnets must be equal in a real design; this tool only counts equal-size splits.
Sources
About this calculator
In CIDR notation, a network's prefix length (like /24) determines its size; splitting a block with parent prefix p into smaller subnets with child prefix c yields 2^(c − p) subnets, and each of those subnets has 2^(32 − c) total addresses, of which 2^(32 − c) − 2 are usable for hosts (the first address is the network address, the last is the broadcast address). This calculator applies both formulas to show how many subnets a given split creates and how many hosts each one can hold.
Network engineers and system administrators use this daily when subnetting an IP range for a new office, VLAN, or department, cloud infrastructure engineers use it when carving VPCs and subnets in AWS, Azure, or GCP, and students studying for networking certifications like the CCNA use it to practice and check subnetting problems by hand.
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 second figure counts every address in each child block, including the network and broadcast addresses, so for ordinary host subnets such as a /24 subtract 2 to get usable hosts. The special cases /31 and /32 follow different rules. This works for IPv4 only, and the child prefix cannot be shorter than the parent. Planning a VLAN layout from one block? Tell us whether you would find IPv6 prefixes useful here.