Combinations With Repetition Calculator

Enter the number of types (n) and items to choose (r) to get the multiset coefficient C(n+r-1, r).

Inputs

Formula

C(n+r−1, r) = (n+r−1)! ÷ (r! × (n−1)!)

Result

Enter n and r above, then click Calculate.
Copied!

Summary

Enter the number of types (n) and items to choose (r) to get the multiset coefficient C(n+r-1, r).

How it works

  1. Enter n — the number of distinct types to choose from.
  2. Enter r — the number of items to select (repetition allowed).
  3. The tool computes C(n+r-1, r) using exact integer arithmetic to avoid overflow.
  4. The result is displayed with the full expanded formula and step-by-step values.
  5. Copy the result to your clipboard with one click.

Use cases

  • Count ice-cream combinations when a flavor can be picked more than once.
  • Calculate the number of ways to distribute identical items among categories.
  • Solve "stars and bars" problems in combinatorics homework.
  • Determine possible outcomes when rolling a die r times and ignoring order.
  • Enumerate multisets of size r drawn from an alphabet of n symbols.

Frequently Asked Questions

Last updated: 2026-06-13 · Reviewed by Nham Vu