How this calculation works
Choose positions for the first group, then choose positions for the second from those remaining. The third group fills the rest.
(a+b+c)! / (a! b! c!)A worked example
Two A, three B and one C can be arranged in 60 distinct orders.
Good to know
Items within each group are indistinguishable.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Account for indistinguishable copies
The default counts are two copies of A, three copies of B and one C, giving six positions. If all copies were distinguishable, there would be 6! = 720 orders. Swapping the two A copies or any of the three B copies does not create a new visible string, so divide by 2! × 3! × 1! = 12. The result is 60.
An equivalent construction chooses the two A positions in C(6,2) = 15 ways. Choose the three B positions from the four remaining slots in C(4,3) = 4 ways. The final slot is forced to be C, giving 15 × 4 = 60 arrangements.
Decide which distinctions matter before counting
This model treats categories as different but copies within a category as identical. If the two A items have individual labels that must be tracked, dividing by 2! would remove distinctions you actually care about. If positions are arranged around a circle with rotations identified, additional symmetry handling is needed.
The Derangement count calculator instead starts with individually distinct items and excludes their original positions. Its constraints do not apply here. Zero copies of a category are allowed, with 0! = 1 preserving the formula. The output is an exact integer string, allowing the count to exceed the range in which ordinary floating-point arithmetic represents every integer exactly.
Read more: NIST DLMF multinomial coefficients (opens in a new tab) ↗
A few questions, answered
What if all items belong to one category?
There is one visible order because every position contains the same symbol.
What happens when all three counts are zero?
There is one empty arrangement. The factorial formula gives 0!/(0!0!0!) = 1.