跳转到正文
nCr

排列组合计算器

nPr / nCr(含重复)与 BigInt 大数结果。

P(n,r) = n!/(n−r)!

n and r are non-negative integers. Without repetition: 0 ≤ r ≤ n. Commas, underscores, full-width digits OK. Results use BigInt.

Formula
P(5, 2)
Result
20

关于排列组合计算器

Permutations (order matters) and combinations (order doesn’t) show up in passwords, team picks, and probability. With or without repetition changes the formula — and hand calculation often overflows factorials or misses r > n. Switch among P(n,r), C(n,r), n^r (repetition), and C(n+r−1,r) (multiset), enter n and r, and read the result. Without-repetition modes enforce 0 ≤ r ≤ n; negatives and non-integers error clearly. Results use BigInt so values beyond Number stay exact within digit guards. Everything runs in your browser; nothing is sent to toco.tools servers.

使用方法

  1. Choose nPr, nCr, or a with-repetition mode
  2. Enter total n and take r
  3. Read the result (copy if needed)

常见问题

What if r > n without repetition?

You get an error. Without repetition, require 0 ≤ r ≤ n.

Difference between with-repetition P and C?

With-repetition permutations are n^r (order matters). With-repetition combinations are C(n+r−1, r) (order doesn’t).

Is my input sent anywhere?

No. All calculation runs in your browser; nothing is sent to toco.tools servers.