When to use this calculator
Combine two logarithmic values without exponentiating their full magnitude. The output is the natural logarithm of the sum of the original positive quantities.
Explore the algebra & number calculators for other questions in this topic. For a related calculation, use the Percentage Change Calculator: Measure the percentage increase or decrease between two positive values.
Understand the log sum exp result
Combine two logarithmic values without exponentiating their full magnitude. For the example inputs First log value = 0, Second log value = 0, the result is 0.693147. The output is the natural logarithm of the sum of the original positive quantities.
PUTTING IT INTO PRACTICE
Log Sum Exp: a worked example
The values below are an illustrative example, not a recommendation. Replace them with measurements or assumptions that match your question.
| Input | Example value |
|---|---|
| First log value | 0 |
| Second log value | 0 |
| Result | 0.693147 |
- Check the input labels and enter the example values above.
- Apply the relationship: LSE(a,b) = max(a,b) + ln(exp(a−max)+exp(b−max)).
- The result is 0.693147 , rounded for display.
How to interpret your result
The output is the natural logarithm of the sum of the original positive quantities. Use real-number inputs within the labelled domain. Results are rounded only for display.
The result is expressed in the stated matching input units. The output is the natural logarithm of the sum of the original positive quantities.
Frequently asked questions
Which assumptions matter for log sum exp?
The output is the natural logarithm of the sum of the original positive quantities. Use real-number inputs within the labelled domain. Results are rounded only for display.
When is the log sum exp calculator useful?
Combine two logarithmic values without exponentiating their full magnitude. The output is the natural logarithm of the sum of the original positive quantities.
How do I use the log sum exp calculator?
Enter first log value, second log value. The result updates automatically. Use the units shown beside each input; the example values illustrate the method.
Which formula does this calculator use?
LSE(a,b) = max(a,b) + ln(exp(a−max)+exp(b−max)).
What should I check before using the result?
The output is the natural logarithm of the sum of the original positive quantities. Use real-number inputs within the labelled domain. Results are rounded only for display.
How are results rounded?
Scalar numbers display up to six decimal places, with scientific notation for very large or small values. Text, fraction, date and schedule outputs use the format described on the tool. Intermediate calculations use JavaScript floating-point arithmetic. Keep sensible precision for your measurements.
Further reading
For background on this topic, see OpenStax: algebra and trigonometry ↗. This is a topic reference, not an external review or endorsement of this tool.
Calculators Map editorial process · Updated · Methods and limitations