%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Secret Sharing Threshold Planner (Shamir k-of-n)

Results update as you type.

Your numbers

Understanding the secret sharing threshold planner — concept and principle

Shamir's secret sharing splits a secret, such as a master key or a wallet seed, into n shares so that any k of them can rebuild it while k − 1 reveal nothing. Choosing k and n is a trade-off: a high threshold resists theft, a low one tolerates lost shares. This planner calculates how likely you are to recover the secret if each share can be lost independently, and how many shares an attacker would need.

Shamir 3-of-5 secret sharingAny 3 of 5 shares rebuild the secret, 2 reveal nothing. With a 5% loss chance per share: 77.4% + 20.4% + 2.1% = 99.88% recoverable.5 shares, any 3 rebuild the secret123453 shares → opens2 shares → nothingEach share lost with 5% chance:all 5 kept 77.4%4: 20.4%3 kept: 2.1%Recoverable 99.88% · thief needs 3
A 3-of-5 split survives losing any two shares (99.88% here), yet a thief still has to steal three.

How it is calculated

If each share is lost with probability p and survives with probability 1 − p, the number of surviving shares follows a binomial distribution. The secret is recoverable when at least k survive:

P(recover) = Σ from i = k to n of C(n, i) × (1 − p)ⁱ × pⁿ⁻ⁱ

where C(n, i) is the number of ways to choose i shares out of n. The attacker must obtain k shares, because fewer than k give no information at all.

The principle

Shamir's scheme hides the secret as the constant term of a random polynomial of degree k − 1 over a finite field, and each share is one point on that curve. Two points fix a line, three fix a parabola, and in general k points fix a polynomial of degree k − 1, so any k shares rebuild it by Lagrange interpolation. With only k − 1 points, every possible secret is still equally consistent with what you hold, which is why the scheme is called information-theoretically secure. The binomial sum simply counts all combinations of surviving shares that reach the threshold.

Worked example

  1. Inputs: n = 5 shares, threshold k = 3, loss probability p = 0.05.
  2. All 5 survive: 0.95⁵ = 0.77378.
  3. Exactly 4 survive: 5 × 0.95⁴ × 0.05 = 0.20363.
  4. Exactly 3 survive: 10 × 0.95³ × 0.05² = 0.02143.
  5. Sum = 0.99884, so the secret is recoverable with probability 99.88%.
  6. An attacker must steal 3 shares.
How Probability secret is recoverable changes with Probability each share is lostHow Probability secret is recoverable ch…9999.299.499.699.81000.01250.0250.03750.050.06250.0750.1Example: 99.88%Probability each share is lost
Each point is the calculator re-run with only “Probability each share is lost” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Probability each share is lostProbability secret is recoverable
0.0125100%
0.02599.98%
0.037599.95%
0.0599.88%
0.062599.78%
0.07599.62%
0.199.14%

How to read the result

Compare with a single copy, which survives with only 95% here. Raising n while keeping k fixed improves recovery; raising k improves resistance to theft but lowers recovery. Many people pick schemes such as 2-of-3 or 3-of-5 so that one or two lost shares are tolerated while no single holder can act alone.

Common mistakes

Keep in mind: The probabilities assume independent losses and an honest, correct implementation. Real risks such as shared storage locations, coercion of holders or flawed software are not modelled; use an audited library.

Frequently asked questions

Is 2-of-3 or 3-of-5 better?

With the same per-share loss, 3-of-5 lets two shares be lost and needs three to be stolen; 2-of-3 is simpler but only one share can be lost and two suffice for theft.

Is Shamir the same as multisig?

No. Shamir rebuilds one secret in one place; multisig requires several independent signatures and never brings the keys together.

Sources: A. Shamir, "How to Share a Secret", Communications of the ACM 22(11), 1979 · W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, Wiley

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →