RMSLE Calculator
Calculate root mean squared logarithmic error for regression predictions.
About RMSLE Calculator
Root Mean Squared Log Error (RMSLE) applies RMSE to the log-transformed values: RMSLE = √[(1/n) × Σ(ln(1+ŷ_i) − ln(1+y_i))²]. The +1 offset avoids taking the log of zero. Because it operates on logarithms, RMSLE treats relative differences symmetrically — an error where the prediction is half the actual value is penalized similarly to a prediction that's twice the actual value — making it well-suited for targets that span several orders of magnitude, like sales volume, population counts, or pricing data.
Formula
RMSLE = sqrt((1/n) * sum((ln(1 + y_hat_i) - ln(1 + y_i))^2))
- n
- Number of samples
- y_i
- Actual value for sample i
- \hat{y}_i
- Predicted value for sample i
Worked example
With the default values below, RMSLE Calculator returns RMSLE of 0.112352. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Actual Values
- 100, 250, 1000, 50
- Predicted Values
- 110, 230, 950, 60
Results
- RMSLE
- 0.112352
- Number of Samples
- 4
Step by step
- 1Sum of squared log errors: Σ(ln(1+ŷ_i) − ln(1+y_i))²= 0.050492
- 2RMSLE: √[Σ(...)² / n]= 0.112352
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why use RMSLE instead of RMSE?
RMSLE penalizes relative (percentage-like) errors rather than absolute ones, so it's less dominated by a few very large-magnitude targets — this makes it a better fit when the target variable spans several orders of magnitude, such as sales counts across products of vastly different popularity.
Why add 1 before taking the logarithm?
Adding 1 avoids taking the logarithm of zero (which is undefined/negative infinity) when actual or predicted values can legitimately be zero, a common situation in count data like sales or web traffic.
Does RMSLE penalize under-prediction and over-prediction equally?
Yes, roughly — because it operates in log-space, RMSLE treats a prediction that's proportionally too low similarly to one that's proportionally too high by the same ratio, unlike RMSE, which is symmetric in absolute rather than relative terms.
