Circular permutation calculator

A circle has no first or last seat, so rotating everyone one place gives the same arrangement. The tool counts with or without allowing the circle to be flipped.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter number of items n, items around the circle r and circle type.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Circular, no flipping: nPr ÷ r, which is (n - 1)! when r = n. When flipping gives the same arrangement (necklace, bracelet) and r ≥ 3: nPr ÷ (2r), which is (n - 1)! ÷ 2 when r = n.

Example

Inputs: Number of items n = 6, Items around the circle r = 6, Circle type = Direction matters (round table). Result: Circular arrangements: 120; Arrangements in a line nPr: 720; Scientific notation: 120.

Limits and caveats

  • All items are assumed to be distinct; beads with repeated colours need a different counting method (Pólya enumeration).
  • n and r are capped at 1000.

Questions about this tool

How many ways can 5 people sit at a round table?

(5 - 1)! = 24, because rotating everyone does not change who sits next to whom.

Why divide by 2 for a necklace?

Flipping a necklace turns a clockwise order into its mirror, so each mirror pair counts once. This does not apply with fewer than 3 items.

What if only some of the items are used?

Enter r below n and the tool uses nPr ÷ r, for example 6 × 5 × 4 ÷ 3 = 40 ways to seat 3 of 6 people at a table.