How to use (3 steps)
- Choose Composition or Partition, then pick the constraint you need.
- Enter n (and k/a/b when required), then select count, table, enumeration, or sample.
- Export CSV/TSV or copy a shareable URL for reuse.
Inputs
Table
Examples
Key formulas and notes
- Compositions count is 2^(n-1) for n >= 1, and k parts use C(n-1, k-1).
- Nonnegative k-part compositions use stars and bars: C(n+k-1, k-1).
- Partitions ignore order; use the Partition tab to compare counts.
- Enumeration is limited for speed; use samples for larger n.
How to use this calculator effectively
This calculator is designed to make scenario checks fast. Use a repeatable workflow: baseline first, one variable change at a time, then compare output direction and magnitude.
How it works
Run your first scenario with defaults. Then, change exactly one assumption and observe which result changes most. That is the fastest way to identify sensitivity and explain what drives the outcome.
When to use
Use this page when you need practical planning support, side-by-side alternatives, or a clean baseline for further discussion.
Common mistakes to avoid
- Changing multiple assumptions simultaneously.
- Confusing percent and decimal inputs.
- Mixing unit systems across scenarios.
- Relying only on rounded display output for final conclusions.
Worked example
Prepare a base case and one alternative case, then compare outputs and validate the direction, scale, and interpretation with the same assumptions across both cases.
See also
FAQ
What is the difference between partitions and compositions?
Partitions ignore order while compositions treat different orders as distinct.
Why is composition count 2^(n-1)?
Each of the n-1 gaps is a divider or not, giving 2^(n-1) combinations.
How do I count compositions with exactly k parts?
Select exactly k parts to compute C(n-1, k-1).
What is the nonnegative k-part formula?
It is C(n+k-1, k-1), the stars and bars count.
Can I restrict parts to a range?
Use bounded parts to restrict each part to [a, b].
Why is enumeration limited for large n?
The number of compositions grows quickly, so enumeration is capped.
Can I compute modulo m?
Yes. Switch to modulo mode and enter the modulus.
Do these samples use a fixed seed?
Yes. The same seed reproduces the same list of samples.
How to use Integer composition calculator (order matters) effectively
What this calculator does
This page is for estimating outcomes by changing inputs in one controlled workflow. The model keeps your focus on variables, not output shape. Start with stable assumptions, then test sensitivity by changing one key input at a time to observe directional impact.
Input meaning and unit policy
Each input has an expected unit and a typical range. For reliable interpretation, check whether you are using the same unit system, period, and base assumptions across all runs. Unit mismatch is the most common source of unexpected drift in numeric results.
Use-case sequence
A practical sequence is: first run with defaults, then create a baseline log, then run one alternative scenario, and finally compare only the changed output metric. This sequence reduces cognitive load and prevents false pattern recognition in early experiments.
Common mistakes to avoid
Avoid changing too many variables at once, mixing incompatible data sources, and interpreting a one-time output without checking robustness. A single contradictory input can flip conclusions, so keep each experiment minimal and document assumptions as part of your note.
Interpretation guidance
Review both magnitude and direction. Direction tells you whether a strategy moves outcomes in the desired direction, while magnitude helps you judge practicality. If both agree, you can proceed; if not, rebuild the baseline and verify constraints before deciding.
Operational checkpoint 1
Record the exact values and intent before you finalize any comparison. Confirm the unit system, date context, and business constraints. Compare outputs side by side and check whether differences are explained by one changed variable or by hidden assumptions. This checkpoint often reveals the single factor that changed everything.