Quick guide
How to use this calculator
- Enter the number of distinct people.
- Choose a line or circle and an optional two-person restriction.
- Read the exact arrangement count.
Calculation method
Use blocks for adjacent people
Unrestricted line and circle counts are n! and (n−1)!. Treating two specified people as a two-order block counts adjacent arrangements; subtracting that count gives non-adjacent arrangements.
Worked example
Five people in a line with two together
Treat the specified pair as one block, arrange four units, then order the pair two ways.
2×4! = 48
Supported inputs
Precision and limits
Discrete domain
Inputs are whole counts. Negative, fractional, grouped, and scientific-notation inputs are rejected.
Exact integers
Results use arbitrary-precision integers and are never rounded. Inputs and output size are bounded to keep the page responsive.
Restriction scope
The restricted modes apply to exactly two specified distinct people. More complex adjacency rules are not inferred.
