Convertisseur de Subnet Mask en CIDR Calculator
Convert a dotted-decimal subnet mask's total bit count to CIDR prefix notation.
Formula and method
This calculator computes CIDR notation, Usable hosts directly in your browser without sending data to an external server.
Mathematical formula
- CIDR notation:
maskBits - Usable hosts:
maskBits===32 ? 1 : maskBits===31 ? 2 : 2^(32-maskBits)-2
Variables and parameters
- Number of 1 bits in mask (maskBits): default value 24.
Some formulas are undefined for certain input combinations (such as division by zero or logarithms of non-positive numbers). In those cases the live tool displays an alert instead of NaN.
Embed this tool
Paste this snippet into your own site or blog post to embed a live, working copy of this tool. It links back to the full page on SpecWhale.
Frequently asked questions
What equation and variables does Subnet Mask To CIDR Calculator use?
Subnet Mask To CIDR Calculator evaluates outputs such as <strong>CIDR notation, Usable hosts</strong> based on inputs including Number of 1 bits in mask. Check the Mathematical Method section for the explicit formula.
What happens if I enter invalid or zero values into Subnet Mask To CIDR Calculator?
If an input combination is mathematically undefined (such as division by zero or negative square roots), SpecWhale alerts you gracefully rather than returning invalid NaN outputs.
Are my calculations in Subnet Mask To CIDR Calculator saved or private?
All calculations are 100% private and run locally in your Web browser. Your numbers are never uploaded to any server, but can be saved locally to your device or exported as CSV/JSON.
Is Subnet Mask To CIDR Calculator free to use?
Yes. Subnet Mask To CIDR Calculator is completely free, has no usage limit, and does not require an account, email, or API key.
Does Subnet Mask To CIDR Calculator store or upload my data?
No. Subnet Mask To CIDR Calculator calculates everything locally in your browser. Nothing you type is sent to a server or stored by SpecWhale.
How accurate is Subnet Mask To CIDR Calculator?
Subnet Mask To CIDR Calculator uses a standard formula (see the Method section above for the exact expression). For high-stakes financial, medical, or legal decisions, confirm the result with a professional or an authoritative source before relying on it.
Can I embed Subnet Mask To CIDR Calculator on my own website?
Yes. Use the "Embed this tool" snippet on this page to add a free, working copy of Subnet Mask To CIDR Calculator to your own blog post or page.