Frequently Asked Questions
Why does a /24 subnet have 254 usable hosts instead of 256?
In IPv4 subnetting, the first address (all host bits 0) is reserved as the Network Identifier and the last address (all host bits 1) is reserved as the Broadcast Address.
Why does the headline mix hosts and entropy bits?
The page runs three independent tools at once and joins their main answers into one line. The host count comes only from the prefix box and the entropy only from the length and alphabet boxes. If you are using one tool, ignore the other half of the headline; it reflects whatever is in the unused boxes.
Can I enter an IP address to see the network and broadcast addresses?
No. The subnet tool takes only the prefix length. It returns the mask, the total address count and the usable host count for a block of that size, but not which specific addresses belong to it. To find a block's network and broadcast address you need the starting IP as well.
How many bits of entropy is enough?
The page labels 80 bits or more as strong and anything lower as moderate. That is a convenient line, not a universal rule. How many bits you need depends on whether an attacker can guess offline at high speed or is limited by a login form, so check the requirement for the system you are protecting.
What alphabet size should I enter for my generator settings?
Count the distinct symbols the generator can choose from. Digits only is 10, lowercase letters 26, upper and lower case 52, those plus digits 62, and adding common keyboard punctuation takes you to about 94. If the generator excludes look-alike characters, subtract them from the count.
Does the calculator measure the strength of a password I type?
No, and there is no box for one. It only computes the theoretical entropy for a random password of a given length and alphabet. A password chosen by a person, especially one built from words or patterns, can be far weaker than the figure shown for its length and character set.
Why does /31 show 2 usable hosts when the formula would give zero?
The engine skips the minus 2 step when there is one host bit or fewer. A /31 therefore reports both of its addresses as usable, matching how point-to-point links use them, and a /32 reports its single address. The formula note on that line does not reflect this exception.
Is the encoded output safe to paste into a full URL?
Paste it as the value of a single query parameter, after the equals sign. Do not encode an entire address with it: colons, slashes and question marks are encoded too, which breaks the link. Build the address with its normal separators and encode only the pieces of data that go inside it. Encoding a value twice is a common slip too: the percent signs themselves get encoded as %25.
Does the page do Base64 encoding?
No. The only encoding line on the result is URL percent-encoding of the text box. Base64 is a different scheme, used to carry binary data as text, and its output is not interchangeable with percent-encoding. If you need it, use a dedicated tool; this page is for preparing values that go inside a URL.
How do non-English characters get encoded?
Each character is turned into its UTF-8 bytes and every byte is written as a percent sign followed by two hex digits. An accented e, for example, becomes %C3%A9, two bytes. Characters outside the basic range can take three or four bytes, so the encoded string grows quickly.
Why are some symbols left unencoded?
The engine uses encodeURIComponent, the standard component encoder found in every browser, and says so on the output line. It leaves letters, digits and the characters - _ . ! ~ * ' ( ) as they are. Most servers accept that. If a system rejects any of them, replace the exclamation mark, asterisk, brackets, apostrophe or tilde with their percent codes yourself.
How fast does entropy grow as I add characters?
Linearly. Every extra character adds log2 of the alphabet size. At 62 symbols that is about 5.95 bits per character, so 10 characters give 59.5 bits and 16 give 95.3 bits. Doubling the length doubles the bits, while doubling the alphabet adds only one bit per character.
Why does a /16 not show in the presets?
The presets only step to /14 and /32 either side of the default /24. Any prefix from /1 to /32 can be typed directly. A /16, for example, reports a mask of 255.255.0.0, and each prefix one step shorter doubles the address count of the one before it.
Three tools, one form, one result line
This page is really three small utilities sharing a form. There is no mode switch. Every time you change any box, the calculator works out the subnet, the password entropy and the URL encoding together and prints all three in a single headline, such as 254 Hosts, 95.3 bits entropy, with the mask and the encoded string underneath.
That matters when you read the result. If you only care about a password, the subnet part of the headline is just the default /24 carrying along, and the reverse is also true. Nothing in one tool feeds the others. The prefix box only drives the subnet lines, the length and alphabet boxes only drive the entropy line, and the text box only drives the encoded output.
The sections below run each tool on its own so you can see what it does, where its edges are and which inputs trip people up. Each one is small enough to check by hand, and the worked figures below all come from running the page with the inputs stated.
Subnet mode: from a prefix to a mask and a host count
The subnet tool takes a single number, the CIDR prefix length from /1 to /32. It does not ask for an IP address, so it tells you how big a block is, not which addresses are in it. You get the dotted subnet mask, the total number of addresses and the usable host count.
The arithmetic is short. Host bits are 32 minus the prefix. Total addresses are 2 raised to the host bits. Usable hosts are that total minus 2, because the first address is the network identifier and the last is the broadcast address. At the default /24 there are 8 host bits, 256 addresses, 254 usable hosts and a mask of 255.255.255.0.
Small blocks show the pattern clearly. A /27 has 5 host bits, 32 addresses and 30 usable hosts, with mask 255.255.255.224. A /28 gives 14 usable hosts and mask 255.255.255.240. A /29 gives 6, with mask 255.255.255.248. A /30 gives 2 usable hosts out of 4 addresses, which is why /30 has long been used for point-to-point links between two routers.
Going the other way, the Lower preset at /14 has 18 host bits. That is 262,144 addresses and 262,142 usable hosts, with mask 255.252.0.0. Each step of one in the prefix halves or doubles the block, so it is often quicker to remember that than to recompute.
The mask itself is just the prefix written out as bits. A /24 is twenty-four ones followed by eight zeros, and each group of eight is converted to a decimal octet. That is why a mask octet can only take a handful of values, each one a run of ones followed by zeros, and why a mask such as 255.255.0.255 can never be valid. If an octet in a mask you were given does not fit that pattern, the mask was copied wrongly.
What happens at /31 and /32
The minus 2 rule breaks down at the very small end, and the engine handles it with a special case. When there is one host bit or none, it does not subtract the network and broadcast addresses.
At /31 the result says 2 usable hosts out of 2 total, with mask 255.255.255.254. That follows the convention for point-to-point links where both addresses are assigned to the two ends and there is no broadcast. At /32, the Higher preset, the result is 1 host out of 1 address, mask 255.255.255.255. A /32 describes a single address, which is how you would write one host in a firewall rule or a route.
One small inconsistency: the usable host line carries a note reading 2 to the host bits minus 2 even at /31 and /32, where the engine has not subtracted anything. Trust the number, not that note. Anything outside /1 to /32, including /0, returns a check inputs message instead of a result.
Password mode: length times log2 of the alphabet
The entropy tool takes two numbers: how many characters the password has and how many different symbols each character could have been. The result is length multiplied by log base 2 of the alphabet size, rounded to one decimal place.
With the defaults, 16 characters from an alphabet of 62 (upper and lower case letters plus digits), the answer is 95.3 bits. Each character contributes about 5.95 bits, and sixteen of them add up. Cut the length to 10 and the result falls to 59.5 bits. Raise the alphabet to 94, roughly the printable keyboard symbols, and a 12 character password gives 78.7 bits.
Length usually beats alphabet size. Going from 62 to 94 symbols adds only about 0.6 bits per character, while adding one more character adds a full 5.95 bits at 62 symbols. A 20 digit PIN, alphabet 10, reaches 66.4 bits, more than an 8 character all lowercase password, which manages only 37.6 bits at alphabet 26.
The engine tags results of 80 bits or more as strong and anything below as moderate. That cut-off is a label inside this page, not a standard you should treat as a rule for every system. A password guarded by slow hashing and rate limits needs fewer bits than one protecting an encryption key that can be attacked offline.
To work backwards from a target, divide the bits you want by the bits per character and round up. Reaching 80 bits from a 62 symbol alphabet takes 14 characters, which the calculator confirms at 83.4 bits, while 13 characters stop at 77.4 bits.
Why the entropy figure assumes a random generator
The formula only holds if every character is picked independently and uniformly from the whole alphabet, the way a password manager or a cryptographically secure generator would pick it. The page says this in its limitations, and it is the single most important thing to understand about the number.
Human-chosen passwords do not behave like that. A 16 character password made from a dictionary word, a capital letter at the front and a year at the end uses symbols from a 62 symbol alphabet, but an attacker does not guess it one random character at a time. Typing its length and 62 into this calculator will report 95.3 bits, and that figure will badly overstate how hard it is to crack.
So use the calculator to compare generator settings, not to grade a password you invented. It answers questions such as how long a random password needs to be from a given character set to reach a target number of bits. It cannot inspect a real password, and you should never paste one into any web form to check it.
The alphabet box also needs care. It must be at least 2, since an alphabet of one symbol carries no information. If you enter 1, the page returns an error, although the message talks about the prefix and password length rather than the alphabet.
Encoding mode: percent-encoding a string
The third tool takes any text and returns it percent-encoded so it can sit safely inside a URL query value. The default text, CalculatorGraph=100%, becomes CalculatorGraph%3D100%25. The equals sign turns into %3D and the percent sign into %25, because both have special meanings in a URL.
Spaces become %20, ampersands %26, slashes %2F and question marks %3F. A test string of a b&c/d?é came out as a%20b%26c%2Fd%3F%C3%A9. The accented letter is first converted to its two UTF-8 bytes, which are then encoded one at a time. A query like price=10 EUR&qty=2 became price%3D10%20EUR%26qty%3D2.
This is the encoding you want for a single parameter value, not for a whole address. Feed it a full link and it encodes the colon and slashes too, so the result is no longer a working URL. Encode each value separately and then assemble the address around them.
The output line names the method it uses: encodeURIComponent, the browser's standard component encoder, which leaves the characters ! * ( ) ' and ~ untouched. Testing hello world!*()~' returned hello%20world!*()~' with only the space encoded. Most servers accept those characters inside a value, but a few systems are stricter, and for those you would need to replace them with their percent codes by hand.
Using the subnet result to plan an address range
Because the subnet tool has no address input, use it to choose a block size, then do the placement yourself. Decide how many devices the segment needs, add room for growth, and find the smallest prefix whose usable host count covers it. Thirty devices fit a /27 exactly, with no spare. Forty need a /26 or larger.
Remember that the usable count is a ceiling, not what you actually get to hand out. Gateways, network equipment and reserved addresses come out of the same pool, and cloud providers often reserve several addresses per subnet on top of network and broadcast. Leave headroom accordingly.
Blocks also have to start on a boundary that matches their size. A /24 begins at an address ending in .0, and a block of 32 addresses must start at a multiple of 32 in the last octet. The calculator will not check that for you, but knowing the total address count from the result tells you the step size between valid starting points.