Logarithm calculator

Calculate logarithm calculator using the values and assumptions you provide.

Calculate logarithm calculator using the values and assumptions you provide.

Both dots and commas are accepted as decimal separators.

Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.

Method and assumptions

Method version 1.0.0 · Updated

Calculate

Formula: log_b(x) = ln(x) / ln(b)

Calculate logarithm calculator using the values and assumptions you provide.

value
Number
base
Base (> 0, not 1)

Results depend on the assumptions entered; verify professional or safety-critical decisions independently.

Calculate with code

These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.

JavaScript
console.log(Math.log(8) / Math.log(2)); // log₂(8) = 3
TypeScript
const result: number = Math.log(8) / Math.log(2);
console.log(result); // 3
Python
import math
print(math.log(8, 2))  # 3.0
Java
System.out.println(Math.log(8) / Math.log(2)); // 3.0
C#
Console.WriteLine(Math.Log(8, 2)); // 3