Calculadora de Subconjunto (contagem)
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
C(n,k) = n! / (k!(n−k)!)
About this calculator
The Subset Calculator determines the number of subsets with exactly k elements that can be formed from a set of n elements. This calculation is based on simple combinations, denoted C(n,k), which counts how many ways to choose k items from a total of n, disregarding order. The formula used is C(n,k) = n! / (k!(n−k)!), where n! is the factorial of n. For example, in a set of 5 elements, the number of 2-element subsets is C(5,2) = 10.
This calculator is useful in various practical situations, such as combinatorial analysis in mathematics, probability problems, forming teams or committees, and card games. It helps answer questions like: how many committees of 3 people can be formed from a group of 10? Or how many different 5-card hands exist in a 52-card deck? The result is an integer representing the distinct possibilities.
When using the calculator, remember that n and k must be non-negative integers, with k ≤ n. If k is greater than n, the result is zero, as it is impossible to choose more elements than available. Additionally, very large n values can generate huge numbers due to rapid factorial growth. The calculator handles this internally, but users should be aware that results may be large.
Common pitfalls include ensuring the problem involves simple combinations (where order does not matter) and not permutations (where order matters). For instance, selecting 2 representatives from a class of 30 is a combination, but selecting a president and vice-president is a permutation. This calculator is specific to combinations, so ensure the context is appropriate.
Frequently asked questions
What does C(n,k) mean in the calculator?
C(n,k) is the number of combinations of n items taken k at a time, i.e., the number of subsets with exactly k elements that can be formed from a set of n elements.
Can I use the calculator for large values like n=100 and k=50?
Yes, the calculator supports large values, but the result may be a very large number. Ensure n and k are non-negative integers and k ≤ n.
What is the difference between combination and permutation?
Combination (C(n,k)) ignores order, while permutation (P(n,k)) considers order. For example, choosing 2 cards from a deck is a combination; choosing 2 cards for a sequence is a permutation.
What happens if I enter k greater than n?
If k > n, the result is zero, because it is impossible to form a subset with more elements than the set has.
Does the calculator accept decimal numbers?
No, n and k must be integers. Combinations are defined only for non-negative integers.