8! = 40320, and where the notation gives up

The last factorial this screen writes as an ordinary integer, and the overflow wall at 21!.

Arithmetic and functions · Level: Classroom · Updated on 2026-11-10

Eight people in a row can be ordered 8·7·6·5·4·3·2·1 ways, which is 40320. Keying 8! gives the same number, and both are plain integers on the display. Ask for 9! and the notation changes: the screen prints 3.6288⋅10+5, the first factorial it can no longer show as digits.

The growth is the point. 20! is 2.4329020081766⋅10+18, which still fits inside a signed 64-bit integer whose ceiling is 9.2233720368548⋅10+18 — and 21! does not. That is why every library that computes factorials exactly switches to a big-integer type around there, and why the counting arguments in probability feel harmless at 8 and dangerous at 20.

Answer

40320

How to read it

8! and the written-out product agree. 9! is the first factorial the display moves into scientific notation.

Source

Factorial notation from Christian Kramp, who popularised the ! sign in 1808; the growth itself is the standard counting argument for permutations

Work it in the calculator

These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.

This is an independent third-party tool site. It is not affiliated with, sponsored by, or authorised by Casio, Texas Instruments or their distributors. Model names and product names are trademarks of their respective owners and appear here only to identify devices.

The keystroke sequences in these manuals were written from this site's own layout data — the same data the online calculator renders — plus publicly available product facts. Specifications and regional configurations are confirmed against the physical device and the manufacturer's most recent material.