Factorials, combinations (nCr), permutations (nPr) and random numbers in Scientific calculator plus 991 for Android
SHIFT x⁻¹ types the factorial sign: (5 + 3)! is 40,320. For combinations, type n, press SHIFT ÷ (nCr), then r: 52C5 = 2,598,960, the number of ways to choose 5 cards from 52. SHIFT × (nPr) counts the ordered arrangements instead: 52P5 = 311,875,200. Answers are exact, every digit, up to roughly 98,600 digits. SHIFT and the decimal-point key (Ran#) give a random number less than 1, and ALPHA and the same key (RanInt) a random whole number from a to b.
- Factorial
- SHIFT x⁻¹ (x!), after the number
- Combinations, permutations
- n, SHIFT ÷ (nCr) or SHIFT × (nPr), r
- Random
- SHIFT or ALPHA, then the decimal point (Ran#, RanInt)
- Answers
- exact, up to roughly 98,600 digits
Five functions here count and draw: the factorial n!, combinations nCr and permutations nPr, and Ran# and RanInt for random numbers. Each is printed above a key, in yellow for SHIFT or violet for ALPHA.
Factorial: n!
n! is 1 × 2 × 3 × … × n, the number of orders n different things can be put in; the same product can be written out with Π. Type the number, or an expression in brackets, then press SHIFT x⁻¹ x! and =.
in (5 + 3)!
out 40320
A factorial grows fast, but whole numbers are kept exactly, up to roughly 98,600 digits: 100! comes back with all 158 of its digits. How large a number can be explains the limits.
Combinations: nCr
nCr is the number of ways to choose r things from n when the order does not matter.
How to work out combinations
-
Type n.
-
Press SHIFT ÷ nCr. The display shows a capital C.
-
Type r and press =.
in 52C5
out 2598960
Binomial probabilities are built on nCr; binompdf and binomcdf on SHIFT 3 (DISTR) give them directly.
Permutations: nPr
nPr counts arrangements, where the order does matter. It works the same way: type n, press SHIFT × nPr and type r. The display shows a capital P.
in 52P5
out 311875200
nCr or nPr. Use nCr when only the selection matters, such as a hand of cards or a committee, and nPr when the order matters as well, such as a race finish or a line-up.
Random numbers: Ran# and RanInt
- Ran#, on SHIFT . Ran#, gives a pseudo-random number less than 1.
- RanInt, on ALPHA . RanInt, gives a random whole number from a to b. Type a, press SHIFT ) for the comma, type b and press =. RanInt(1, 6) is like a throw of a die.
The input line writes it RanInt#(1, 6), with a #. Each press of = draws again, so the value changes from press to press and will not match any example.
At a glance
| Keys | Function | Example |
|---|---|---|
| SHIFT x⁻¹ x! | Factorial | (5 + 3)! = 40,320 |
| SHIFT ÷ nCr | Combinations | 52C5 = 2,598,960 |
| SHIFT × nPr | Permutations | 52P5 = 311,875,200 |
| SHIFT . Ran# | A random number less than 1 | |
| ALPHA . RanInt | A random whole number from a to b | RanInt(1, 6) |
| SHIFT ) , | The comma between a and b |
Questions
How do I calculate combinations (nCr) on the calculator?
Type n, press SHIFT ÷ (nCr), type r and press =. 52C5 gives 2,598,960: that many different hands of 5 cards can be dealt from 52. The display shows it as 52C5, with a capital C between the numbers.
What is the difference between nCr and nPr?
nCr counts selections, where order does not matter; nPr counts arrangements, where it does. Choosing 5 cards from 52 gives 52C5 = 2,598,960, and choosing 5 in order gives 52P5 = 311,875,200, far more, since the same five cards can be laid out in many different orders.
How large a factorial can it work out?
Any factorial whose answer fits in roughly 98,600 digits comes back exact, every digit shown: 100!, for one, has 158 digits and you get all of them.
How do I get a random number between 1 and 6?
Press ALPHA and the decimal point (RanInt), type 1, press SHIFT ) for the comma, type 6 and press =. Each press of = draws another whole number from 1 to 6. SHIFT and the decimal point (Ran#) give a random number less than 1 instead.
Related pages
- Prime factorisation, GCD and LCM FACT for prime factors, GCD and LCM for common divisors and multiples
- Binomial, Poisson and geometric probabilities binompdf and binomcdf, Poisson, geometric, lists and the whole table
- Summation (∑) and product (∏), including infinite series ∑ and ∏ over a range of whole numbers, and infinite series
- Powers, roots and logarithms x², xʸ and x³; square, cube and nth roots; eˣ, 10ˣ, ln, log and a log to any base
- Numbers, arithmetic and complex numbers which mode and which page, the keys, and how numbers are held
Written from the calculator's own manual and from the app itself, version 7.6.0; every figure is one the manual shows or a capture of the app proves. Last revised on 29 September 2026.
Bug reports and feature requests go to kimcuc@samatica.com — a person reads it.