Inverse Tangent Calculator

Inverse Poisson Calculator

An inverse Poisson calculator finds the smallest count k whose cumulative Poisson probability reaches p, for a mean λ. It solves for λ from a probability and gives the exact confidence interval for a count, with worked steps, probability bars, the CDF graph and the matching R qpois and Python poisson.ppf calls.

What is the Inverse Poisson Distribution?

The inverse Poisson distribution finds the smallest count k with P(X ≤ k) ≥ p, for a Poisson variable X with mean λ. It answers "how many events should I plan for?" where the Poisson CDF answers "how likely is k events or fewer?".

k = min { k : e^(−λ) Σᵢ₌₀ᵏ λⁱ / i! ≥ p }
  • X counts events in a fixed interval: calls per hour, defects per metre, arrivals per day.
  • For λ = 4 and p = 0.95, k = 8: P(X ≤ 7) = 0.9489 falls short and P(X ≤ 8) = 0.9786 reaches 0.95.
  • The answer is a whole number, so the probability at k usually lands above p, not on it.

Other names: the Poisson quantile function, qpois in R and poisson.ppf in Python.

k for p = 0.95 as λ changes

Move the mean λ. The shaded bars from 0 to k hold at least 95% of the probability.

How to Calculate the Inverse Poisson?

To calculate the inverse Poisson, add the probabilities P(X = 0), P(X = 1), P(X = 2), … until the running total reaches p; the last count added is k. For λ = 4 and p = 0.95:

  1. P(X = 0) = e^(−4) = 0.0183. Total 0.0183.
  2. Each next term is the last one times λ/i: 0.0733, 0.1465, 0.1954, 0.1954, 0.1563, 0.1042, 0.0595.
  3. The total after k = 7 is 0.9489, still below 0.95.
  4. Add P(X = 8) = 0.0298. The total is 0.9786, so k = 8.

The rule "times λ/i" saves work: P(X = i) = P(X = i − 1) × λ / i, so no factorials are needed.

Step-by-step inverse Poisson

Type a mean λ and a probability p.

How to Use This Inverse Poisson Calculator?

Pick a mode, type the numbers, and the calculator returns k, λ or an interval as you type. The steps:

  1. Choose Find k for a count, Find λ for a rate, or Interval for λ for a confidence interval from an observed count.
  2. For k: type the mean λ and the probability p, then pick the rule. "At most k" gives P(X ≤ k) ≥ p. "More than k" gives P(X > k) ≤ p.
  3. Type p as a decimal (0.95), a percent (95%) or a fraction (19/20).
  4. Read the answer, the probabilities on each side of k, the normal approximation and the most likely count.
  5. Open the probability bars or the cumulative graph, and the worked steps.

The result can be copied, shared as a link, printed or kept in the history list.

Try an example

Each button fills the calculator above and scrolls to the result.

Inverse Poisson Formula

The inverse Poisson has no closed formula: k is the smallest whole number where the Poisson CDF reaches p.

Q(p) = min { k : P(X ≤ k) ≥ p }
  • Cumulative probability: P(X ≤ k) = e^(−λ) Σᵢ₌₀ᵏ λⁱ / i!.
  • Probability of exactly i events: P(X = i) = e^(−λ) λⁱ / i!.
  • Recurrence: P(X = i) = P(X = i − 1) · λ / i, starting from e^(−λ).
  • Right tail: the smallest k with P(X > k) ≤ p is Q(1 − p).
  • Gamma link: P(X ≤ k) = Q(k + 1, λ), the regularized upper incomplete gamma function.
  • Mean and variance: both equal λ, so the standard deviation is √λ.

Software jumps close with the normal guess λ + z√λ, then steps up or down one count at a time.

One probability, several answers

Type a probability p to see k for λ = 4, λ = 10 and the right-tail rule.

Adding Poisson Probabilities Step by Step

The inverse Poisson stacks P(X = 0), P(X = 1), … end to end; k is the block that pushes the total past p.

iP(X = i)P(X ≤ i)
00.01830.0183
10.07330.0916
20.14650.2381
30.19540.4335
40.19540.6288
50.15630.7851
60.10420.8893
70.05950.9489
80.02980.9786

Read the table backwards: p = 0.5 lands at k = 4, p = 0.9 at k = 7 and p = 0.95 at k = 8. Any p from 0.9489 up to 0.9786 gives the same k = 8.

Running total

Move λ and type p. Each block is one P(X = i); the highlighted block is k.

How to Find λ from a Probability?

To find λ, solve e^(−λ) Σᵢ₌₀ᵏ λⁱ / i! = p for λ; the left side falls as λ grows, so one λ fits and bisection finds it.

  • P(X = 0) = 0.05: e^(−λ) = 0.05 gives λ = −ln 0.05 = 2.9957.
  • P(X ≤ 3) = 0.5: λ = 3.6721, so 3.6721 is the mean whose median count is 3.
  • P(X ≤ 10) = 0.95: λ = 6.1690.

The same λ comes from the chi-square distribution: λ = χ²(1 − p; 2k + 2) / 2. For k = 3 and p = 0.05, λ = 15.5073 / 2 = 7.7537.

Find λ step by step

Type a count k and the probability P(X ≤ k).

Confidence Interval for a Poisson Count

The exact (Garwood) confidence interval for λ after k events runs from λ₁ with P(X ≥ k) = α/2 to λ₂ with P(X ≤ k) = α/2. After 12 events, the 95% interval is 6.2006 to 20.9616.

λ₁ = χ²(α/2; 2k) / 2, λ₂ = χ²(1 − α/2; 2k + 2) / 2
Count k95% intervalNormal k ± 1.96√k
00 to 3.6890 to 0
10.025 to 5.572−0.960 to 2.960
51.624 to 11.6680.617 to 9.383
104.795 to 18.3903.802 to 16.198
5037.111 to 65.91936.141 to 63.859
10081.364 to 121.62780.400 to 119.600

Divide both bounds by the exposure to get a rate. 30 events in 10 years gives a 90% interval of 2.16 to 4.07 events a year.

Zero events still gives an upper bound: 3.689 at 95% two-sided, or 2.996 one-sided. The "rule of 3" uses this: no events in n trials puts the rate below about 3/n.

Exact and approximate intervals

Move the count and pick a level. The exact interval sits to the right of the normal one for small counts.

Normal Approximation to the Inverse Poisson

For large λ, k ≈ ⌈λ + z√λ − 0.5⌉, where z = Φ⁻¹(p) and the 0.5 is a continuity correction. The approximation improves as λ grows, since the skewness 1/√λ shrinks.

  • λ = 4, p = 0.95: the approximation gives 7, the exact answer is 8.
  • λ = 10, p = 0.95: both give 15.
  • λ = 100, p = 0.95: the approximation gives 116, the exact answer is 117.
  • λ = 120, p = 0.99: the approximation gives 145, the exact answer is 146.

The Poisson distribution leans right, so the normal guess tends to fall 1 short in the upper tail. Use the exact sum when the count sets stock, staff or capacity.

Exact k against the normal curve

Move λ. The bars are the Poisson probabilities; the curve is the normal approximation.

Inverse Poisson Graph (Step Function)

The graph of the inverse Poisson is a staircase: k stays flat while p moves inside one step of the CDF, then jumps by 1.

  • The Poisson CDF F(k) is a step graph that climbs from e^(−λ) towards 1.
  • Read it sideways: draw a level at p, move right to the first step at or above it, and read k.
  • The steps are tallest near k = λ, where the probabilities are largest.
  • For λ = 4, every p from 0.4335 to 0.6288 returns k = 4.

Read k off the CDF

Move p. The dashed level meets the first step that reaches it.

Inverse Poisson in R, Python and Excel

R has qpois(p, λ), Python has scipy.stats.poisson.ppf(p, λ) and MATLAB has poissinv(p, λ); Excel and the TI-84 have no inverse Poisson function.

  • R: qpois(0.95, 4) returns 8. qpois(0.05, 4, lower.tail = FALSE) gives the right-tail answer, 8.
  • Python: from scipy.stats import poisson; poisson.ppf(0.95, 4) returns 8.0.
  • MATLAB: poissinv(0.95, 4) returns 8.
  • Excel and Google Sheets: list k in one column and =POISSON.DIST(k, 4, TRUE) next to it, then take the first row at or above p.
  • TI-84: run poissoncdf(4, k) for k = 0, 1, 2, … until the result reaches p.

The same inverse Poisson in code

Type p and λ, then pick a tool.

Inverse Poisson Table (k for Common Probabilities)

The inverse Poisson table lists the smallest k with P(X ≤ k) ≥ p for means from 0.5 to 100. Click a row to load that λ with p = 0.95 into the calculator.

The 0.5 column is the median. For whole-number λ the median equals λ; the 99% column sits about 2.3√λ above the mean.

Inverse Poisson table

Filter by value, or click a row to send it to the calculator.

Mean λp = 0.5p = 0.9p = 0.95p = 0.99p = 0.999
0.501234
112345
224568
3356810
4478911
55891113
669101215
8812131518
101014151821
121217182124
151520222528
202026283135
252532333742
303037394348
505059626773
100100113117124132

Inverse Poisson vs Poisson CDF

The Poisson CDF turns a count into a probability; the inverse Poisson turns a probability back into a count. P(X ≤ 8) = 0.9786 for λ = 4, and qpois(0.9786, 4) = 8.

PropertyCDF F(k)Inverse Q(p)
Inputcount k = 0, 1, 2, …0 < p < 1
Outputa probabilitya whole count
Rppoisqpois
Pythonpoisson.cdfpoisson.ppf
Graphrising stepsrising steps, axes swapped

The round trip Q(F(k)) = k always holds. F(Q(p)) = p holds only when p lands on a step; otherwise F(Q(p)) is a little above p.

CDF and inverse side by side

Type a probability between 0 and 1, or a whole count, to see both directions for λ = 4.

Inverse Poisson in Real Life

The inverse Poisson sets capacity: how many staff, parts, servers or beds cover random demand a chosen share of the time.

  • Call centre: 120 calls an hour on average. Planning for 146 calls covers 99% of hours.
  • Spare parts: 3 failures a month on average. A stock of 8 parts runs out in fewer than 1 month in 250.
  • Web server: 40 requests a second on average. Capacity for 55 covers 99% of seconds.
  • Hospital beds: 18 admissions a day on average. 25 free beds cover 95% of days.
  • Quality control: with 2 defects per roll expected, a roll with more than qpois(0.99, 2) = 6 defects flags a problem.

Plan for random demand

Pick an example, set the average and choose a service level.

Inverse Poisson FAQ

What is the inverse Poisson?

The inverse Poisson is the Poisson quantile function. For a mean λ and a probability p, it returns the smallest whole count k with P(X ≤ k) ≥ p.

What is qpois?

qpois is the R function for the inverse Poisson. qpois(0.95, 4) returns 8, the smallest k with P(X ≤ k) ≥ 0.95 when λ = 4.

Why is P(X ≤ k) not exactly p?

A Poisson count jumps in whole steps, so the CDF skips most values. The calculator returns the first k whose cumulative probability reaches p, which usually lands a little above p.

What is the 95th percentile of a Poisson distribution with mean 4?

k = 8. P(X ≤ 7) = 0.9489 is below 0.95 and P(X ≤ 8) = 0.9786 is above it.

What is the median of a Poisson distribution?

The median is qpois(0.5, λ). For whole-number λ it equals λ; for other λ it lies between λ − ln 2 and λ + 1/3.

How do I find λ from a probability?

Use the Find λ mode. It solves P(X ≤ k; λ) = p by bisection. P(X = 0) = 0.05 gives λ = 2.9957, and P(X ≤ 3) = 0.5 gives λ = 3.6721.

How do I calculate a confidence interval for a Poisson count?

Use the Interval mode. The exact 95% interval after 12 events is 6.2006 to 20.9616. Divide by the exposure to get a rate.

What is the upper bound when no events are observed?

With k = 0, the 95% two-sided upper bound is 3.689 and the one-sided bound is 2.996, the basis of the rule of 3.

Does Excel have an inverse Poisson function?

No. Excel has POISSON.DIST for the CDF. List k = 0, 1, 2, … with =POISSON.DIST(k, λ, TRUE) and take the first row at or above p.

What is the Python function for the inverse Poisson?

scipy.stats.poisson.ppf(p, λ). poisson.ppf(0.95, 4) returns 8.0.

What does the right-tail rule mean?

It returns the smallest k with P(X > k) ≤ p: a count exceeded with probability p or less. It equals the left-tail answer for 1 − p.

When can I use the normal approximation?

For λ above about 20, k ≈ ⌈λ + z√λ − 0.5⌉ is usually exact or 1 short. For small λ the Poisson leans right and the exact sum is safer.

Can λ be a decimal?

Yes. λ is an average, so 2.5 calls a minute is fine. The answer k is always a whole number.

How large can λ be in this calculator?

Up to 10,000,000. The calculator uses the regularized incomplete gamma function, so large means stay accurate.

Is the inverse Poisson the same as the Poisson CDF?

No. The CDF takes a count and returns a probability; the inverse takes a probability and returns a count. They undo each other: qpois(ppois(k, λ), λ) = k.