Combination Sum Calculator - Find Number Combinations
Find all combinations of numbers that add up to a target sum. Free online combination sum calculator with step-by-step results.
What is Combination Sum Calculator?
How to Use Combination Sum Calculator
Enter a set of candidate numbers (comma-separated, e.g., 2, 3, 5, 7) and a target sum (e.g., 10). Click "Calculate" to find all unique combinations that add up to the target. By default, each number can be reused multiple times. Toggle the "Use each number once" option to restrict to single use. Results are displayed as a clear list of all valid combinations.
How Combination Sum Calculator Works
Common Use Cases
- Finding which invoices, bills, or transactions add up to a specific total for accounting reconciliation
- Calculating coin or bill combinations to make exact change for a given amount
- Solving number puzzles and coding challenges (LeetCode, HackerRank, coding interviews)
- Determining which items fit within a budget or weight limit (simplified knapsack problem)
- Planning portion sizes or ingredient quantities that sum to a target measurement
- Exploring combinatorial mathematics and understanding backtracking algorithms
Frequently Asked Questions
Can numbers be reused?▼
Yes, by default each candidate number can be used unlimited times. You can toggle "Use each number once" to restrict each number to a single use, which is useful for finding exact matches in a list of unique values like invoices or transactions.
What is the maximum input size?▼
For performance in the browser, we recommend keeping the candidate set under 20 numbers and the target sum under 1000. Larger inputs may produce thousands of combinations and take longer to compute.
What algorithm does this use?▼
The calculator uses a backtracking algorithm with pruning. It sorts the candidates first, then systematically explores all possible combinations while skipping branches that cannot possibly reach the target. This is the same approach used in computer science interviews and competitive programming.
Why are results limited to 500 combinations?▼
Large inputs can produce millions of combinations. The 500-combination limit keeps the tool responsive in your browser. For most practical problems (accounting, puzzles, resource allocation), the complete solution set is well under this limit.
Can I use negative numbers?▼
The calculator is designed for positive integers. Negative numbers create infinite combinations (you could keep adding and subtracting). If you need negative number support, filter your results based on additional constraints.
How is this different from permutations?▼
Combinations ignore order — [2, 3, 5] and [5, 3, 2] are the same combination. Permutations treat different orderings as distinct results. This calculator finds combinations only, which is what most practical use cases need.
Related Tools
Geometric Progression Solver
Solve geometric progressions online. Calculate the nth term, sum, common ratio, ...
Playback Speed Calculator
Calculate how long a video or audio will take at different playback speeds. Free...
Palindrome Generator
Generate palindromes from any text online for free. Create words, phrases, and s...