Enter actual and predicted values
Use commas, spaces, tabs, or new lines. MSLE only accepts nonnegative values because it uses ln(1 + value).
Example data table
This sample produces an MSLE near 0.013888 and an RMSLE near 0.117848.
| # | Actual | Predicted | ln(1 + actual) | ln(1 + predicted) | Squared log error |
|---|---|---|---|---|---|
| 1 | 3 | 2.5 | 1.386294 | 1.252763 | 0.017831 |
| 2 | 5 | 6 | 1.791759 | 1.945910 | 0.023762 |
| 3 | 10 | 9 | 2.397895 | 2.302585 | 0.009084 |
| 4 | 20 | 18 | 3.044522 | 2.944439 | 0.010017 |
| 5 | 50 | 55 | 3.931826 | 4.025352 | 0.008747 |
Formula used
MSLE emphasizes relative differences after logarithmic transformation. Large errors on large targets are softened, while proportional mistakes remain visible.
- n is the number of paired observations.
- ln means the natural logarithm.
- Adding 1 allows zero values to be included safely.
- All actual and predicted values must stay nonnegative.
How to use this calculator
- Paste actual values into the first box.
- Paste matching predicted values into the second box.
- Add a dataset label, rounding preference, and tolerance.
- Press Calculate MSLE to generate metrics, tables, and the graph.
- Use the CSV or PDF buttons to export your evaluation results.
Frequently asked questions
1. What does MSLE measure?
MSLE measures average squared differences between logged actual and predicted values. It rewards models that keep proportional errors small instead of only minimizing raw distance.
2. When is MSLE useful in machine learning?
MSLE is useful when targets span wide ranges and relative accuracy matters. It often fits forecasting, demand estimation, traffic prediction, and revenue modeling tasks.
3. Can I use zero values?
Yes. The formula uses ln(1 + value), so zeros are valid inputs. Negative values are not valid because logarithms of negative shifted values break the metric.
4. Why does the calculator reject negative numbers?
MSLE depends on logarithms. If actual or predicted values are negative, ln(1 + value) may be undefined or distort interpretation, so the calculator blocks them.
5. What is the difference between MSLE and RMSLE?
MSLE is the averaged squared logged error. RMSLE is its square root. RMSLE stays in logged units and can feel easier to read when comparing model runs.
6. Does a lower MSLE always mean a better model?
Lower MSLE usually indicates better relative fit for the same dataset. It should still be reviewed alongside business goals, bias direction, and other validation metrics.
7. Why include a correlation value here?
Correlation does not replace MSLE, but it helps show directional alignment between actual and predicted values. High correlation with high MSLE can still reveal calibration problems.
8. Can I paste spreadsheet columns directly?
Yes. The parser accepts commas, spaces, tabs, and line breaks. You can usually paste a full spreadsheet column into each box without reformatting.