Hongmu Notes

🎲 Permutation and combination calculator

Input the total number n and the selected number r, and obtain the factorial, the number of permutations A(n,r), and the number of combinations C(n,r) at once, and automatically provide a relational expression check and comparison with commonly used values.
100% Browser local processing 0 Data upload

🎲 Factorials, permutations and combinations

💡 Instructions for use

  • If only n is filled in and r is not filled in, only the factorial is output; if both are filled in, the number of permutations and combinations will be given at the same time, which is suitable for checking together.
  • The input is calculated precisely with large integers: the factorial of 1000 has over two thousand digits, without scientific notation or loss of precision.
  • The result area will automatically check two identities: the factorial of the combination number multiplied by r is equal to the permutation number; C(n,r) is equal to C(n,n-r).
  • r must not be greater than n, otherwise the input error will be prompted; when n is 0, the factorial is 1, which conforms to mathematical conventions.

🎲 Obtain factorial, permutation number and combination number at once

Input the total number n and the selected number r, and the result area will provide the factorial of n, the factorial of r, the factorial of (n-r), the number of permutations A(n,r) and the number of combinations C(n,r), along with the number of result digits. The three factorials are the common basis for permutation and combination. Putting them together makes it easier to see the relationship between them.

When only n is filled in and r is not filled in, only the factorial is output, which is suitable for scenarios that simply require factorial values.

✅ Automatic verification of two identities

The results area simultaneously verifies whether C(n,r) × r! is equal to A(n,r), and whether C(n,r) is equal to C(n,n-r). The two identities respectively reflect "combination and reordering equals permutation" and "selecting and leaving are one-to-one correspondence". If either of them is not established, it means there is a problem with the input or implementation, which can be discovered immediately.

If "Equal" is displayed at the end of the check line, it means the identity is established.

🔒 Data is not uploaded

Factorials and combinations are all completed using the browser's built-in large integer operations, without calling the server interface and without the need to register or log in. The entered value only exists on the current page and will be cleared when refreshing; when needed, use the copy or download button to save it as plain text.

The page is also available offline, making it suitable for checking assignments on a computer without a network connection.

🔗 All keywords and tutorials

Keywords page of the tool12a

Return to tool home page

❓ FAQ

What are C(5,2) and A(5,2) respectively??
The number of combinations C(5,2) is equal to 10, and the number of permutations A(5,2) is equal to 20. The difference between the two is a factorial multiple of 2, which is the number of options that are sorted after selection.
Why the factorial of 0 is 1?
This is a mathematical convention, which can be understood as "the empty set has only one arrangement." It also ensures that the combinatorial number formula still holds when r is 0 or n.
How big can the permutation and combination be??
n is supported up to 1000. At this point the factorial has over two thousand digits, and the tool accurately outputs large integers without scientific notation or loss of precision.
How many combinations of lottery numbers are there??
Taking the common "select 6 numbers from 49 numbers" as an example, the number of combinations is C(49,6) = 13983816. This value is directly given in the common comparison in the tool result area.
Why are the result digits displayed separately??
Factorial and combinatorial numbers grow extremely fast, and the digits themselves are useful information that can be used to quickly determine the magnitude of the results and check whether they are correct.