Binary log loss single-case calculator
Score one binary probability forecast using the natural-log penalty for assigning probability to the outcome that did not occur.
Related calculators
Use these tools when your question extends to a neighboring part of the same calculation.
How to use this calculator
Score one binary probability forecast using the natural-log penalty for assigning probability to the outcome that did not occur.
- Enter Probability assigned to event (0–1), Observed outcome (0 or 1). Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Binary log loss single-case calculator
Score one binary probability forecast using the natural-log penalty for assigning probability to the outcome that did not occur.
What it measures
Score one binary probability forecast using the natural-log penalty for assigning probability to the outcome that did not occur.
Inputs and units
- Probability assigned to event (0–1): Enter a proportion on the 0–1 scale stated in the label, not a percent from 0 to 100.
- Observed outcome (0 or 1): Enter the value represented by this label; keep its domain, sign, and units consistent with the formula and assumptions below.
Formula and method
−[y ln(p)+(1−y)ln(1−p)]
Worked example
If y=1 and p=0.8, loss=−ln(0.8)≈0.2231. If p=0.2 instead, the loss rises to −ln(0.2)≈1.6094.
Interpreting the result
Lower loss is better; a confident wrong forecast is penalized much more than a cautious one. A single case is not enough to judge overall model quality.
Assumptions and limits
Enter p strictly between 0 and 1 and y as 0 or 1. The theoretical endpoint loss is zero when the certain forecast is correct and infinite when it is wrong; this calculator requires interior probabilities so every displayed value is finite.
Sources and method
- Gives binary log loss as negative log likelihood with natural logarithms. scikit-learn: Log loss
Frequently asked questions
Why must p be between 0 and 1?
The calculator returns a finite logarithmic score for interior probabilities; exact endpoint forecasts have zero or infinite loss depending on the observed outcome.
Is this the average model log loss?
No. It scores one case; a data set score averages case losses.
How do I use the Binary log loss single-case calculator?
Enter Probability assigned to event (0–1), Observed outcome (0 or 1). Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Binary log loss single-case?
If y=1 and p=0.8, loss=−ln(0.8)≈0.2231. If p=0.2 instead, the loss rises to −ln(0.2)≈1.6094.
What does the Binary log loss single-case calculator calculate?
Score one binary probability forecast using the natural-log penalty for assigning probability to the outcome that did not occur.
See the calculation methodology.