Permutation & Combination (nPr, nCr)

Permutation & Combination (nPr, nCr): Evaluates permutations P(5, 2) = 5! / 3! and combinations C(5, 2) = 5! / (2! * 3!).

Loading tool module...

About this permutation & combination (npr, ncr)

Permutation & Combination (nPr, nCr) — browser-based utility.

How this tool works

Calculation and parameter relationship: permutations=n!/(n−r)!; combinations=n!/(r!×(n−r)!)

  1. Select “Raw JSON / Advanced” and paste the sample input.
  2. Click “Run locally”.
  3. Compare “Raw Output Data” with the example; revise inputs when an error is shown.

Worked example

Scenario: Count ordered and unordered selections of two items from five.

Sample input:

{"n":5,"r":2}

Processing: Validate integer 0 ≤ r ≤ n, then use factorial ratios for nPr and nCr.

Illustrative output:

{ "n": 5, "r": 2, "permutations": 20, "combinations": 10 }

Limits and verification

Parameter domains and units: n,r ∈ ℤ; 0 ≤ r ≤ n ≤ 170; 0! = 1; BigInt → binary64. Results use binary64 floating-point numbers unless BigInt is stated. Result cards show up to 10 significant digits; raw output retains the serialized value. A null ratio means the model has no meaningful finite value for that ratio; it is not zero.

Examples demonstrate an expected workflow; they do not prove every input or every branch of an external specification. Check important results with an independent source before using them for money, security, compliance, safety, or irreversible file changes.

Browser processing boundary

Tool input is processed by code running in the browser and is not intentionally sent to a CZOA processing API. The page can still request ordinary site assets, analytics, or advertising when those services are enabled. Browser extensions and managed-device software remain outside this tool's control.

Relevant references

These references govern or help explain the format, protocol, or calculation used here. Listing a reference does not claim certification or complete implementation of every optional feature.

Content owner: CZOA Tools · Last reviewed: 2026-09-15 · Review methodology

How to use it

  1. Select “Raw JSON / Advanced” and paste the sample input.
  2. Click “Run locally”.
  3. Compare “Raw Output Data” with the example; revise inputs when an error is shown.

Frequently asked questions

How are permutation and combination results calculated?+

The calculator requires nonnegative integer n and r with r ≤ n. It returns permutations n!/(n−r)! where order matters, and combinations n!/(r!×(n−r)!) where order does not matter.

What can I enter on this page?+

The interactive form exposes n and r; Raw JSON / Advanced accepts {"n":5,"r":2}. Enter both integer fields and run the local calculation.

What boundaries and numeric limits apply?+

Decimals are rejected before calculation, as are negative values and r greater than n. Results use JavaScript Number factorial arithmetic, so very large inputs can lose integer precision or become non-finite.

What result does the worked example produce?+

The tool received {"n":5,"r":2} and exactly returned n 5, r 2, permutations 20 and combinations 10. This verifies that one local vector, not all factorial sizes.