Probability Calculator
Calculate combinations, permutations, and probabilities.
Combinations (nCr) - Order Doesn't Matter
Calculate the number of ways to choose r items from n items (without regard to order)
Result:
Combinations (C(n,r)):
Common Examples:
Permutations (nPr) - Order Matters
Calculate the number of ways to arrange r items from n items (order matters)
Result:
Permutations (P(n,r)):
Common Examples:
Factorial (n!)
Calculate the factorial of a number (product of all positive integers up to n)
Result:
Factorial (n!):
Quick Reference:
| n | n! | n | n! |
|---|---|---|---|
| 0 | 1 | 6 | 720 |
| 1 | 1 | 7 | 5,040 |
| 2 | 2 | 8 | 40,320 |
| 3 | 6 | 9 | 362,880 |
| 4 | 24 | 10 | 3,628,800 |
| 5 | 120 | 15 | 1.31 × 10¹² |
Basic Probability
Calculate the probability of an event occurring
Result:
Probability:
Percentage:
Odds:
Common Examples:
Multiple Events (AND / OR)
Calculate probability of multiple independent events
Result:
Probability:
Percentage:
Common Examples:
📚 How It Works
Factorial (n!)
The factorial of n is the product of all positive integers from 1 to n:
n! = n × (n-1) × (n-2) × ... × 2 × 1
Example: 5! = 5 × 4 × 3 × 2 × 1 = 120
Note: 0! = 1 by definition
Combinations (nCr)
Number of ways to choose r items from n items, order doesn't matter:
C(n,r) = n! / [r! × (n-r)!]
Example: How many 5-card poker hands from 52 cards?
C(52,5) = 52! / (5! × 47!) = 2,598,960
- Use for: Lottery numbers, committees, card hands
- Example: Choosing 3 toppings from 10 → C(10,3) = 120 ways
Permutations (nPr)
Number of ways to arrange r items from n items, order matters:
P(n,r) = n! / (n-r)!
Example: How many ways to award gold, silver, bronze to 8 athletes?
P(8,3) = 8! / 5! = 8 × 7 × 6 = 336
- Use for: Race positions, passwords, seating arrangements
- Example: Arranging 4 books on a shelf → P(4,4) = 4! = 24 ways
Combinations vs. Permutations
Key difference: Does order matter?
- Combination: ABC = BAC = CAB (same group)
- Permutation: ABC ≠ BAC ≠ CAB (different arrangements)
Relationship: P(n,r) = C(n,r) × r!
Basic Probability
Probability of an event occurring:
P(E) = (Number of favorable outcomes) / (Total possible outcomes)
- Probability ranges from 0 (impossible) to 1 (certain)
- Often expressed as percentage (multiply by 100)
- Example: P(rolling a 6) = 1/6 ≈ 0.167 = 16.7%
Multiple Independent Events
Independent: One event doesn't affect the other (e.g., two coin flips)
- P(A AND B): P(A) × P(B) - Both events occur
- P(A OR B): P(A) + P(B) - P(A AND B) - At least one occurs
- P(NOT A): 1 - P(A) - Event doesn't occur
Example: Probability of two heads in two coin flips:
P(H AND H) = 0.5 × 0.5 = 0.25 = 25%
Real-World Applications
- Gambling: Card game odds, lottery chances
- Genetics: Probability of inherited traits
- Quality Control: Defect rates in manufacturing
- Insurance: Risk assessment and pricing
- Sports: Tournament brackets, playoff scenarios
- Cryptography: Password strength, key combinations
- Medicine: Treatment success rates, diagnostic tests
Common Probability Scenarios
| Scenario | Probability | Calculation |
|---|---|---|
| Coin flip (heads) | 0.5 (50%) | 1 out of 2 |
| Die roll (6) | 0.167 (16.7%) | 1 out of 6 |
| Drawing an ace | 0.077 (7.7%) | 4 out of 52 |
| Royal flush (poker) | 0.00000154 | 4 / C(52,5) |
| Winning 6/49 lottery | 0.0000000715 | 1 / C(49,6) |
Important Notes
- Independence: Events must be independent for AND/OR rules to work
- With/Without Replacement: Affects probability in sequential events
- Mutually Exclusive: Events that can't both happen (e.g., rolling 2 and 6)
- Large numbers: For n > 170, factorial calculations may overflow
🔗 Related Utils
Feedback
Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.
Sending...
Feedback sent. Thank you!
Error occurred!
-
-
-
-
-
-
-
- ABI Encoder / Decoder
- Block Estimator
- Calldata Cost
- CREATE2 Address
- ENS Availability
- ENS Cost Estimator
- ENS Lookup
- ENS Namehash
- ENS Record Viewer
- ENS Subname Explorer
- ERC-20 Unit Converter
- Gas Estimator
- HD Wallet Derivation
- Merkle Tree Visualizer
- 4-Byte Selector Lookup
- Solidity Storage Layout
- Transaction Decoder
- Vanity Address Estimator
- Wallet Address Validator
- Wei/Gwei/Ether Converter
-
-
-
-
-
- API Response
- ASCII Table
- Code Bug Detector
- Code Explanation
- CSS Beautifier
- Env Parser
- GraphQL Query
- Syntax Highlight
- HTML Beautifier
- JS Beautifier
- JSON Formatter
- JSONPath
- JWT Decoder
- JS keyCodes
- API Lorem Ipsum
- RegExp
- Regex Library
- Semver Compare
- SQL Beautifier
- TOML Formatter
- Code Unminifier
- XML Beautifier
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Amortization
- Break-Even
- Compound Interest
- Crypto Profit/Loss
- Debt Payoff
- Discount
- Effective Interest
- Emergency Fund
- Inflation Calculator
- Simple Interest
- Invoice Calculator
- IRR Calculator
- Mortgage
- NPV Calculator
- Portfolio
- Profit Margin
- Rent vs Buy
- Retirement Calc
- ROI Calculator
- Salary vs Hourly
- Savings Goal
- Tax Calculator
- VAT
-
-
-
-
-
-
-
-
-
-
-
-
- Equation Solver
- Exponent Calculator
- Factorial Calculator
- Fibonacci Sequence
- Fraction Calculator
- Fraction Simplifier
- GCD Calculator
- GCD/LCM
- Least Common Multiple (LCM) Calculator
- Logarithm Calculator
- Magic Square
- Matrix Calculator
- Number Base Converter
- Pascal's Triangle
- PDE Solver
- Prime Checker
- Prime Factorization
- Roman Numbers
- Scientific Notation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Broken Link Checker
- Canonical URL Checker
- Core Web Vitals Checker
- Favicon
- Heading Structure
- Keyword Density
- Meta Tags
- Mobile-Friendly Test
- Open Graph Tags
- Page Load Time Analyzer
- Redirect Checker
- robots.txt
- Schema Markup
- SEO Optimized Checklist
- XML Sitemap
- Time on Page Tracker
- Page Title & Desc.
- Twitter Card Generator
-
-
-
-
-
-
- Acceleration
- Substance Amount
- Angle
- Area
- Astronomical
- Base Converter
- Capacitance
- Electric Charge
- Data Transfer
- Data Storage
- Density
- Energy Converter
- Force Converter
- Frequency Converter
- Fuel Economy
- Illuminance
- Inductance
- Length / Distance
- Power
- Pressure
- Electrical Resistance
- Time
- Speed
- Temperature
- Viscosity
- Volume
- Weight
-
-
-
-
-