Maths & numbers

Integer composition count calculator

Count ordered ways to split a positive total into a fixed number of positive parts.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

For total 5 split into two parts, 1+4 and 4+1 are separate compositions.

THE FORMULAC(total − 1, parts − 1)

A worked example

Split seven unit marks at two of the six interior gaps to get 15 compositions.

Good to know

A composition has no zero parts.

Read the result

Count ordered ways to split a positive total into a fixed number of positive parts.

The primary result is labeled “Compositions”. Keep the input definitions in view when comparing this result with another method.

Try a related calculation

A composition has no zero parts.

For a related exercise, try the greatest common divisor.

A few questions, answered

How can I check the default inputs by hand?

Split seven unit marks at two of the six interior gaps to get 15 compositions.

Which rule does this calculator apply?

C(total − 1, parts − 1)

Find your calculator

Start typing to explore the library.