Skip to content
MasterMath

Variation Calculator

How many ways to choose k items from n when the order does matter — podium finishes, PIN codes, passwords.

Possible arrangements

—

Possible arrangements—
The formula—
If order did not matter—
Order multiplies by—

How this was worked out

    The rule

    V(n, k) = n! ÷ (n − k)!

    Why it works

    A variation, or partial permutation, counts ordered selections. There are n choices for the first place, n−1 for the second, and so on, which is exactly n! divided by the factorial of what is left over.

    How to do it by hand

    1. Count the choices for the first position: n
    2. For the second: n − 1, and so on for k positions
    3. Multiply them all together
    4. With repetition allowed it is simply n to the power k

    What is worth knowing

    The distinction from combinations is exactly a factor of k!, which is why order costs so much: choosing 3 from 10 gives 120 combinations but 720 variations. Variations with repetition are what password strength rests on, and the numbers are unforgiving in both directions: a 4-digit PIN is 10⁴, ten thousand possibilities, which a computer exhausts instantly. An 8-character password from 94 printable characters is 94⁸, about six quadrillion — still breakable, which is why length beats complexity.

    Frequently asked questions

    What is a variation?

    An ordered selection of k items from n. It is sometimes called a partial permutation.

    How does it relate to combinations?

    Variations are combinations times k!, because each group of k can be ordered in k! ways.

    What is the difference with and without repetition?

    Without, each item is used once and the count is n!/(n−k)!. With repetition it is simply n to the power k.

    Why do password calculations use this?

    Because a password is an ordered selection with repetition allowed. An 8-character password from 94 symbols is 94⁸ possibilities.