Calculators

Eulerian Number Calculator

Calculate exact Eulerian numbers for up to 200 distinct items and descents privately in your browser, with recurrence and digit count.

Count permutations of distinct items with exactly k descents (an item larger than its next neighbor). Exact BigInt arithmetic keeps every digit. Your data stays in your browser.

Enter a whole number from 0 to 200 using digits only. A(0, 0) is 1. Five items with two descents have 66 permutations. For positive n, k must be less than n for a nonzero result.

Your Eulerian number will appear here.

Count permutations with a fixed number of descents.

The Eulerian number A(n, k) counts permutations of n distinct ordered items with exactly k descents. A descent occurs when an item is greater than the item immediately after it. For example, 312 has one descent (3 > 1); 321 has two. For three items, the counts for zero, one and two descents are 1, 4 and 1. A(5, 2) = 66. Use A(n, k) = (k + 1) × A(n − 1, k) + (n − k) × A(n − 1, k − 1), starting from A(0, 0) = 1 and treating out-of-range entries as zero. The empty permutation has zero descents. For positive n, k greater than or equal to n gives zero. Summing over all k gives n factorial. This uses the zero-based descent convention; some references index Eulerian numbers by runs instead, shifting k by one. It does not count Euler numbers, Euler zigzag numbers or permutations of repeated items. Both inputs accept 0 to 200 using one to three digits; leading zeros and surrounding whitespace are accepted. Signs, decimals, separators and scientific notation are rejected. Exact BigInt arithmetic preserves every digit. Inputs are not uploaded or stored.

Frequently Asked Questions

Everything you need to know about this tool, how it works, and privacy.

What is a descent?

A descent is an adjacent pair in descending order. The permutation 312 has one descent; 321 has two. A(3, 1) = 4.

What happens with zero items or too many descents?

A(0, 0) = 1 for the empty permutation. For positive n there are at most n − 1 descents, so k greater than or equal to n gives zero.

Which Eulerian number convention is used?

A(n, k) counts exactly k descents, starting at k = 0. References that count ascending runs use an index shifted by one. These are not Euler or Euler zigzag numbers.

Are the results exact and private?

Yes. BigInt arithmetic preserves every digit for inputs from 0 to 200. Inputs are processed in your browser without uploading or storage.