Home/Crypto & Blockchain/Wallet, Security & Tax/Transaction Confirmation Probability

Formula & Calculator

Transaction Confirmation Probability

Estimates the probability that a transaction with n confirmations is secure against a double-spend attack, based on the attacker's relative hash power.

CryptoSecurityBlockchain

Confirmation Safety Calculator Probability

P ≈ 1 − (q / p)n  ·  p = 1 − q
P = probability safe  ·  q = attacker hash rate  ·  p = honest hash rate  ·  n = confirmations
⟹ Solve P, q, n
ratio
blocks
%
Please fix the errors above.
Solve for:
Presets:
Safety Probability
q: n: P:
✓ Copied!
Safety Probability
Low (< 50%) Medium (50–95%) High (> 95%)
P ≈ 1 − (q/p)n, p = 1 − q  ·  Assumes attacker has less than 50% hash rate (q < 0.5).

Interpretation

P(n confirmations safe) ≈ 1 − (q/p)^n. The probability that a confirmed transaction is irreversible. q is attacker hash rate, p is honest hash rate.

P(n confirmations safe) ≈ 1 - (q/p)^n
Transaction Confirmation Probability

Variables

SymbolQuantityUnit
PProbability the transaction is secure
qAttacker's fraction of network hash power
pHonest network's fraction of hash power (1-q)
nNumber of confirmations

What it means

In Bitcoin, the probability of a double‑spend decreases exponentially with confirmations. This formula estimates the safety of a transaction after n confirmations. It is used by exchanges and merchants to decide how many confirmations to wait for. Understanding this is essential for secure blockchain transaction acceptance.

Worked example

Transaction Confirmation Probability – Two Detailed Examples

Real‑World
Scenario: An attacker controls 10% of the network hash rate (q = 0.10). After 6 confirmations, the probability of a successful double‑spend is approximately 1 - (q/p)^n, where p = 0.90. The security probability is about 99.99%. This is why 6 confirmations are considered safe for Bitcoin transactions. The merchant waits for 6 confirmations before shipping goods.
ParameterValue
Attacker Hash Power (q)10%
Confirmations (n)6
1Security Probability ≈ 99.99%
Result ~99.99% ✓ Very safe
Scenario: If an attacker has 30% hash power (q = 0.30), after 6 confirmations the security probability is about 97.9%. This is still high, but the risk is slightly elevated. Exchanges may require more confirmations for larger transactions to mitigate this risk.
ParameterValue
q30%
n6
1Security Probability ≈ 97.9%
Result ~97.9% ✓ Still safe
Insight: The security of a transaction increases with the number of confirmations. The probability of a successful double‑spend decreases exponentially as the attacker's hash power decreases and confirmations increase.

Common mistakes

  • Transaction confirmation probability: Approximate probability that a transaction is safe after n confirmations.
  • q: Probability of an attacker catching up (often <0.5).
  • p: Probability of honest chain extending (1−q).
  • Assumption: Simplified model – use for rough estimates only.

Applications

Transaction confirmation probability estimates the likelihood that a transaction with a given number of confirmations is safe from double‑spend attacks, using the probability of a successful attack. This is based on the assumed attacker hash rate q and honest miner hash rate p. Understanding this helps merchants and users decide how many confirmations are needed.

  • Determining the number of confirmations required for merchant acceptance
  • Assessing the security of transactions against double‑spends
  • Setting deposit confirmation policies on exchanges
  • Risk management for high‑value transactions
  • Educational understanding of blockchain security

Frequently Asked Questions

Q01How do I estimate the probability that a cryptocurrency transaction with a given number of confirmations is secure against a double-spend attack by an attacker with a certain hash power?
A01

P(n confirmations safe) ≈ 1 - (q/p)^n, where q is the attacker's hash power fraction, p = 1 - q. For example, with q=10% and n=6, the probability is about 99.99% (since (0.1/0.9)^6 ≈ 0.000001). This assumes the attacker has not already mined a longer chain.

Q02Why are 6 confirmations considered the standard for Bitcoin?
A02

Historically, 6 confirmations was recommended to reduce the risk of a double-spend to below 0.1% for an attacker with 10% hash power. It is a risk management guideline, not a guarantee.

Q03Does the confirmation probability depend on the network hash rate?
A03

Yes, the probability that a transaction is safe depends on the attacker's relative hash power. Higher total hash rate means it is harder for an attacker to succeed, but the relative fraction is what matters.

Q04What is the risk of a double-spend after 1 confirmation?
A04

With one confirmation, the risk is higher. For an attacker with 10% hash power, the probability of a successful double-spend is about 11% (q/p). This is why one confirmation is not considered safe for large transactions.

Q05How does the formula change if the attacker is mining secretly?
A05

The formula assumes the attacker can mine a longer chain than the honest network. The probability of success is based on the attacker's ability to catch up, which is governed by the Poisson distribution. The simplified formula is a good approximation.

Q06Can I use this formula for other proof-of-work cryptocurrencies?
A06

Yes, the same logic applies to any PoW chain, but you need to adjust the block time and the attacker's hash power fraction accordingly.

Q07Is there a formula for proof-of-stake finality?
A07

Proof-of-stake networks often have deterministic finality after a certain number of epochs, not probabilistic. The risk of reversal is different and often lower than in PoW.

Q08What is the acceptable level of confirmation risk for a small transaction?
A08

For small amounts, 1-3 confirmations may be acceptable. For larger amounts, 6 or more is recommended. The risk tolerance depends on the value and the trust in the counterparty.