Subnet Calculator
Calculate IPv4 subnet details from any IP address and CIDR prefix length. Instantly find the network address, broadcast address, subnet mask, wildcard mask, usable host range, and total host count. Essential for network engineers, system administrators, and IT students configuring routers, firewalls, VLANs, and cloud VPC subnets.
Enter Values
Result
Enter values above and click Calculate to see your result.
AI Assistant
Ask about this calculator
I can help you understand the subnet calculator formula, interpret your results, and answer follow-up questions.
Try asking
Formula
How it works: The calculator converts four octets into a 32-bit integer, creates a subnet mask from the CIDR prefix length (the number of leading 1 bits), then applies bitwise AND to find the network address and bitwise OR with the inverted mask to find the broadcast address. Usable hosts are everything between network + 1 and broadcast - 1, following standard RFC conventions. /31 and /32 are handled as special cases.
Worked Example
Frequently Asked Questions
What is a CIDR prefix length?
The CIDR prefix (like /24 or /16) indicates how many of the 32 bits in an IPv4 address are used for the network portion. A /24 means 24 network bits and 8 host bits, giving 256 addresses (254 usable). Common prefixes: /8 (16 million addresses), /16 (65,536), /24 (256), /28 (16), /30 (4), /32 (1).
Why are /31 and /32 handled differently?
/32 is a single host address with no network or broadcast. /31 is a point-to-point link per RFC 3021 with exactly 2 addresses and no traditional broadcast, commonly used for router-to-router connections to save IP space.
Are private IP ranges like 192.168.x.x calculated differently?
No. The same bitwise subnet math applies to all IPv4 addresses. Whether the address is private (10.x.x.x, 172.16-31.x.x, 192.168.x.x) or public only affects routing on the internet, not the subnet calculation itself.
Does this calculator support IPv6?
No. This calculator handles IPv4 (32-bit) addresses only. IPv6 uses 128-bit addresses with hexadecimal notation and requires a different subnet calculator.
What is a wildcard mask?
The wildcard mask is the inverse of the subnet mask (each bit flipped). For a /24 subnet mask 255.255.255.0, the wildcard mask is 0.0.0.255. Wildcard masks are used in Cisco ACLs and OSPF configurations to specify which address bits to match.
Can I embed this Subnet Calculator on my website?
Yes. Click the "Embed" button at the top of this page to customize the size, colors, and theme, then copy the iframe code. Paste it into any HTML page, WordPress site, or CMS. It is completely free, requires no signup, and works on all devices. You can also visit our embed guide at calculory.com/services/embed-calculators for more details.
AI Assistant
Ask about this calculator
I can help you understand the subnet calculator formula, interpret your results, and answer follow-up questions.
Try asking
Related Calculators
More Maths Calculators
View allRelated Articles
All articles
Types of Calculators in 2026: A Complete Guide to Choosing the Right One
Every type of calculator explained: basic, desk, scientific, graphing, printing, financial, construction (Sonic Cal style), online, app, and voice. Pick the right one in under a minute.
Read article
Best Voice Calculators in 2026: Online Tools and Mobile Apps Compared
The best voice calculators of 2026 compared: web tools, iPhone and Android apps, talking calculators, and PC options. Find the right voice activated calculator.
Read article
Best Math Training Apps in 2026: 12 Picks for Students, Adults, and Speed Enthusiasts
We tested 12 math training apps across four categories: academic support, logical reasoning, mental math speed, and gamified learning. See which apps actually improve your skills in 2026.
Read article
Guide to Interactive Math Games for Kids and Classrooms 2026
Interactive math games in 2026 blend adaptive online platforms with low-prep classroom activities. Use this guide to pick the best game format by age, goal, and time.
Read articleModern Tools for Every Need
Accurate and Reliable
All calculations run locally. Step-by-step solutions you can trust.
Verified Precision
Precise Mathematical Calculations Powered by Calculory AI