nPr vs nCr

Permutation (order matters): nPr = n! / (n-r)!. Combination (order doesn't matter): nCr = n! / (r!(n-r)!). Example: arranging 3 out of 5 books on a shelf = 5P3 = 60. Choosing 3 out of 5 books = 5C3 = 10.

Inputs

n (total items)
r (chosen items)

Results

Permutation (nPr)
720
Combination (nCr)
120
n!
3,628,800
r!
6

10P3 = 10!/(10-3)! = 720 · 10C3 = 10!/(3!·7!) = 120