Probability calculator

Calculate an event probability, its complement and the odds in its favor.

Changing modes clears your inputs and result.

Odds are reduced to a ratio in favor of the event. 25% gives 1:3; an impossible event gives 0:1 and a certain event gives 1:0.

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

From a percentage

Formula: Complement = 100% − probability; odds in favor = probability : complement

Odds are reduced to a ratio in favor of the event. 25% gives 1:3; an impossible event gives 0:1 and a certain event gives 1:0.

probabilityPercent
Event probability (%)
From possible outcomes

Formula: Probability = favorable outcomes ÷ total outcomes × 100

Every outcome must be equally likely. Favorable outcomes cannot exceed the total. Odds are shown in favor of the event.

favorableOutcomes
Favorable outcomes
totalOutcomes
Total equally likely outcomes

Percentage input accepts 0 to 100 with up to six decimal places. The outcomes method assumes equally likely outcomes and accepts safe integers only. Odds are exact and reduced; 1:0 represents a certain event.

Calculate with code

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

JavaScript
const favorable = 3, total = 8;
console.log(favorable / total); // 0.375 probability
TypeScript
const favorable = 3, total = 8;
const probability: number = favorable / total;
console.log(probability); // 0.375
Python
print(3 / 8)  # 0.375
Java
System.out.println(3.0 / 8); // 0.375
C#
Console.WriteLine(3.0 / 8); // 0.375