
Percentage Calculator
the percentage calculator can be used calculate the percentage of a number by entering the percentage and the quantity required for the calculation
Log base 2 answers a small question with a lot of consequences: how many times do you have to double 1 to reach x? If x is 8, the answer is 3, because . The notation is , and it shows up everywhere computers do, because computers count in binary. This calculator runs it both ways, feed it x to get , or feed it the log to recover x.
asks: what power of 2 equals x? Plug in 16 and the answer is 4, because . Plug in 1 and you get 0, because anything raised to the zero is 1. Fractions are normal too: , since 3 sits between and . Behind the scenes the calculator uses the change-of-base trick, , which is how most software computes it.
Type a positive number into x and read the binary logarithm off the second field. Reverse the process by entering a value into ; the calculator returns 2 raised to that exponent. So x = 64 gives , and gives x = 64. Either direction works.
Algorithm analysis. When a textbook says an algorithm runs in O(log n), the log is almost always base 2. Binary search halves the problem each step, so finding an entry in a sorted list of a million items takes about 20 comparisons, . The same logic governs balanced binary trees, heaps, and merge sort.
Bit counting. To store a non-negative integer n you need bits. That's why 255 fits in 8 bits () and why a 32-bit unsigned integer tops out around 4.3 billion ().
Information theory. Shannon defined information in bits, and bits come straight out of log base 2. A fair coin flip carries bit of information; a fair six-sided die carries bits per roll. Lossless compression schemes use the same math to figure out how close they can get to a file's theoretical minimum size.
Graphics, audio, and signal processing. Mipmap levels in texture mapping step down by a factor of two per level, octaves in music double in frequency, and FFTs are happiest when input sizes are powers of two. is the unit of measurement for any of those ladders.
Powers of 2 land on whole numbers: 2, 4, 8, 16, 32, 64 give 1, 2, 3, 4, 5, 6. Anything in between is a fraction, and anything between 0 and 1 turns negative, . For a rough mental estimate, count how many times you can halve the number before crossing 1. Halving 100 goes 50, 25, 12.5, 6.25, 3.125, 1.5625, 0.78… about 6.6 steps, and is in fact 6.644.
Different base, same idea. uses 2, ln uses Euler's number , and bare "log" usually means base 10, except in math papers it can mean ln, and in computer science it almost always means log₂. Context decides. They are all related by constants: .
For a non-negative integer n, bits. So 0 through 255 fits in 8 bits, 0 through 65,535 fits in 16, and the pattern continues. Signed integers give up one bit for the sign, so an 8-bit signed range is -128 to 127.
Your input is between 0 and 1. because halving 1 once gets you to 0.5; because you halve three times. The logarithm is just counting doublings, and going below 1 means counting in reverse.
Real logarithms only exist for positive inputs. heads off to negative infinity (you would need to halve forever to reach 0), and of a negative number only makes sense in the complex plane, which is outside this calculator's scope.

the percentage calculator can be used calculate the percentage of a number by entering the percentage and the quantity required for the calculation

The distance calculator can be used to calculate the distance between two points in two-dimensional or three-dimensional space

Convert decimals to percentages and back. Type 0.75 to see 75%, or 25% to see 0.25. Works with negatives and values over 100% too.

Find the digital root of any positive integer. Add the digits, repeat until one digit remains, and use the result for number theory work or quick arithmetic checks.

Calculate logarithms with any base. Works for base 10, base e (natural log), base 2, or any positive base you choose. Solve forwards or backwards from any two values.

Find ln(x) and e^x in one place. Enter any positive number to get its natural logarithm, or enter a logarithm to recover the original value.
Log Base 2 Calculator
Find log₂(x) or work backwards from a logarithm to x. A free binary logarithm calculator for computer science, algorithm analysis, and information theory.
https://hexacalculator.com/calculators/mathematics/arithmetic/log-base-2-calculator
Mathematics
Arithmetic