Bernoulli Number Calculator
Input
- The Bernoulli numbers are the rational constants in the expansion of x / (e^x - 1), and they surface in sums of powers, the Euler-Maclaurin formula and the values of the zeta function at even integers.
- Every odd Bernoulli number past B1 is zero, and the even ones alternate in sign while growing quickly in size.
- The Akiyama-Tanigawa algorithm computes them exactly as fractions; for n = 6 it gives B(6) = 1/42.
- In decimal that is 0.0238, with numerator 1 and denominator 42.
This bernoulli number calculator computes the Bernoulli numbers exactly as fractions, using the Akiyama-Tanigawa algorithm. These numbers are the rational constants in the expansion of x / (e^x - 1), and they show up in sums of powers, the Euler-Maclaurin formula and zeta values at even integers. The calculator returns exact rational results rather than rounded decimals, so you can see each number in its true form. For example, B(6) = 1/42, which is 0.0238 in decimal; B(10) = 5/66, about 0.0758; and B(12) = -691/2730, about -0.2531, where the numerator 691 is a famous irregular prime. Two patterns are built into the results: every odd Bernoulli number beyond B1 is zero, and the even ones alternate in sign.
The Akiyama-Tanigawa algorithm is the accepted standard for this kind of calculation because it builds the numbers step by step as exact fractions, avoiding the rounding error that comes from working in floating point. That is why this calculator can report B(12) as -691/2730 instead of an approximation. On this page you will find the formula the calculator uses, the step-by-step workings behind each result, worked examples you can follow by hand, and the sources for the definitions and values shown.
Worked examples
B6, the 1/42 constant
(6)
| Bernoulli number B(6) | 1/42 |
| Decimal value | 0.0238 |
| Numerator | 1 |
| Denominator | 42 |
B10
(10)
| Bernoulli number B(10) | 5/66 |
| Decimal value | 0.0758 |
| Numerator | 5 |
| Denominator | 66 |
B12, with the famous 691 numerator
(12)
| Bernoulli number B(12) | -691/2,730 |
| Decimal value | -0.2531 |
| Numerator | -691 |
| Denominator | 2,730 |
Constants hiding in a power series
The Bernoulli numbers are the rational constants in the expansion of x / (e^x - 1). That expression is a generating function: written as a power series in x, its coefficients are the Bernoulli numbers, so a single compact formula packages an entire infinite list of fractions. The same constants turn up in three places that at first look unrelated — sums of powers, the Euler-Maclaurin formula, and zeta values at even integers. A bernoulli number calculator exists precisely because those constants are rational but not simple: they are exact fractions with numerators and denominators that grow quickly, and rounding them too early spoils the result.
In sums of powers, the Bernoulli numbers are the ingredients of Faulhaber's formulas. These are the closed expressions for 1^k + 2^k + ... + n^k, and the Bernoulli numbers supply the coefficients. Euler-Maclaurin summation uses the same constants to connect a sum to an integral, with correction terms built from Bernoulli numbers; that is why the numbers appear whenever a discrete total is approximated by a continuous one. The zeta connection is the third role: Bernoulli numbers determine zeta values at even integers, tying the series coefficients to a classical family of constants.
The list has striking structure. Every odd Bernoulli number beyond B1 is zero, and the even ones alternate in sign. The values also grow in a way that defeats intuition. B(6) = 1/42, which is 0.0238 in decimal. B(10) = 5/66, about 0.0758, and B(12) = -691/2730, about -0.2531. That last numerator, 691, is a famous irregular prime — a reminder that these coefficients are not decorative but carry genuine arithmetic information.
Because the values are exact fractions, the method of computation matters. The Akiyama-Tanigawa algorithm computes the numbers exactly as fractions, which is what this calculator does. Working in fractions keeps B(12) as -691/2730 rather than a rounded decimal, so the numerator 691 stays visible and the sign alternation is preserved without drift. Decimal approximations are useful for reading size at a glance, but the fraction is the real answer.
The practical lesson is that the generating function is a compact description, not a shortcut around arithmetic. Each Bernoulli number is a rational constant defined by the series for x / (e^x - 1), and each one feeds the sums-of-powers and Euler-Maclaurin machinery. Checking a value means checking the exact fraction, including its sign and its numerator.
- Generating function: x / (e^x - 1) expands in powers of x, with Bernoulli numbers as the rational coefficients.
- Uses: sums of powers (Faulhaber), the Euler-Maclaurin formula, and zeta values at even integers.
- Pattern: every odd Bernoulli number beyond B1 is zero; the even ones alternate in sign.
- Sample values: B(6) = 1/42 = 0.0238; B(10) = 5/66 ≈ 0.0758; B(12) = -691/2730 ≈ -0.2531.
- Method: the Akiyama-Tanigawa algorithm computes exact fractions, which is what this calculator does.
Exact fractions, not decimals
Bernoulli numbers are exact rational values, and this bernoulli number calculator keeps them that way. Rounding them to decimals would quietly destroy the very thing that makes them useful: the precise numerator and denominator that carry the pattern. B(6) is 1/42, which is 0.0238 in decimal. B(10) is 5/66, about 0.0758. B(12) is -691/2730, about -0.2531. Each of those fractions is a clean, closed value. Each decimal is only an approximation that happens to look tidy at a few places and then trails off.
The difference matters most at B(12). Its numerator, 691, is a famous irregular prime, and that fact is invisible in -0.2531. A decimal view tells you the number is small and negative. The fraction tells you which prime sits on top of it, which is exactly the kind of detail that matters when Bernoulli numbers show up in sums of powers, the Euler-Maclaurin formula, and zeta values at even integers. If the calculator rounded early, you would never see 691 at all.
The Akiyama-Tanigawa algorithm computes the numbers exactly as fractions, which is what this calculator does. It builds each value through a simple triangular scheme of additions and multiplications, and it carries every intermediate result as a numerator over a denominator rather than as a floating-point approximation. Because no rounding step is ever introduced, the fractions that come out are the true ones. The algorithm does not estimate B(12) and then guess at a fraction close to it; it arrives at -691/2730 directly.
This is also why the structure of the sequence stays visible. Every odd Bernoulli number beyond B1 is zero, and the even ones alternate in sign, so the exact list shows a run of zeros for the odd terms and a clean sign flip from one even term to the next. B(6) = 1/42 is positive, B(10) = 5/66 is positive, and B(12) = -691/2730 is negative. In exact form you can compare magnitudes by looking at the fractions themselves, without wondering whether a difference of a few thousandths is real or just an artifact of rounding.
So when you use the calculator, read the output as the answer, not as a preview of one. The fraction is the Bernoulli number. The decimal beside it, such as 0.0238 for B(6) or about -0.2531 for B(12), is there to give you a sense of size and sign. Keep the fraction when precision matters, and treat the decimal as a convenience.
- B(6) = 1/42, which is 0.0238 in decimal.
- B(10) = 5/66, about 0.0758.
- B(12) = -691/2730, about -0.2531; the numerator 691 is a famous irregular prime.
- Every odd Bernoulli number beyond B1 is zero, and the even ones alternate in sign.
| Bernoulli number | Exact fraction | Decimal approximation |
|---|---|---|
| B(6) | 1/42 | 0.0238 |
| B(10) | 5/66 | about 0.0758 |
| B(12) | -691/2730 | about -0.2531 |
The pattern of signs and zeros
One of the first things you notice when you list the Bernoulli numbers is how many of them are simply zero. Every odd Bernoulli number beyond B1 is zero. That single rule removes half of the odd-indexed entries from the table and makes the sequence look far sparser than you might expect. A bernoulli number calculator makes this easy to confirm: ask for B3, B5, B7, B9 and so on, and each one comes back as exactly 0, not a tiny residue or a rounding artifact. The zeros are exact because the numbers are rational constants defined by the expansion of x / (e^x - 1), and the structure of that expansion forces the odd terms past B1 to vanish.
The even terms are where the real action is, and they do two things at once: they alternate in sign and they grow quickly. B(6) = 1/42, which is 0.0238 in decimal. B(10) = 5/66, about 0.0758, and B(12) = -691/2730, about -0.2531. Notice the sign flip between B(10), which is positive, and B(12), which is negative, and notice how much larger in magnitude B(12) is than B(10). The pattern continues: positive, negative, positive, negative, with the sizes climbing as the index rises. The numerator 691 in B(12) is a famous irregular prime, a number that shows up in number theory for reasons well beyond this one fraction.
Because the values are exact fractions, a calculator that works in floating point can obscure this pattern. Rounding may turn a true zero into something like 1e-17, and it can blur the exact numerators and denominators that carry the interesting structure. The Akiyama-Tanigawa algorithm computes the numbers exactly as fractions, which is what this calculator does. That means the zeros come back as 0, the signs are unambiguous, and B(12) is reported as -691/2730 rather than a decimal approximation.
Reading the table with these rules in mind turns a long list of fractions into something predictable. Skip the odd entries past B1, since they are all zero. Then watch the even entries: the sign alternates, and the magnitude grows as the index climbs. Those two observations, plus the exact fraction form, are enough to sanity-check almost any value the calculator returns.
- Every odd Bernoulli number beyond B1 is zero — an exact zero, not a rounding artifact.
- The even Bernoulli numbers alternate in sign as the index increases.
- The even terms grow quickly in magnitude: B(10) = 5/66, about 0.0758, while B(12) = -691/2730, about -0.2531.
- The numerator 691 in B(12) is a famous irregular prime.
- The Akiyama-Tanigawa algorithm keeps every result as an exact fraction, so zeros and signs stay clear.
Why 691 is famous
Most of the Bernoulli numbers are modest-looking fractions. B(6) = 1/42, which is 0.0238 in decimal, and B(10) = 5/66, about 0.0758. Then B(12) = -691/2730, about -0.2531, and suddenly there is a four-digit prime sitting in the numerator. That number, 691, is the reason B(12) gets talked about more than its neighbors. The Bernoulli numbers are the rational constants in the expansion of x / (e^x - 1); they appear in sums of powers, the Euler-Maclaurin formula and zeta values at even integers, so a large prime appearing in one of them is not a private curiosity. It shows up in several other places in number theory.
The first of those places is Ramanujan's work on congruences. Ramanujan found striking divisibility patterns among Bernoulli numbers, and 691 is one of the primes that behaves unusually in them. The appearance of such a large prime in B(12), long before any obvious pattern would predict it, is part of why the Bernoulli numbers resist simple description. Every odd Bernoulli number beyond B1 is zero, and the even ones alternate in sign, so the sequence has a rigid skeleton. The sizes of the numerators and denominators, however, do not follow anything so tidy. A calculator that returns B(12) as a fraction rather than a rounded decimal makes that jump visible.
The second place is the theory of irregular primes. A prime p is called irregular when it divides the numerator of one of the Bernoulli numbers B(2), B(4), ..., B(p-3). The smallest irregular prime is 37, and 691 is itself irregular. The name comes from Kummer's work on Fermat's Last Theorem: for regular primes, Kummer proved the theorem holds, and the irregular primes are exactly the cases his method could not reach. The Bernoulli numbers therefore sit at the center of a classical problem, and 691 is one of the numbers that marks the boundary between the regular and irregular cases.
This is also why a Bernoulli number calculator is more useful than a table of decimals. The interesting information is in the exact fraction, especially the numerator, and rounding to a few decimal places throws it away. The Akiyama-Tanigawa algorithm computes the numbers exactly as fractions, which is what this calculator does, so B(12) comes back as -691/2730 with the numerator intact and ready to inspect. Checking whether a prime divides a Bernoulli numerator, or simply seeing how large the numerators grow, depends on that exactness. A bernoulli number calculator that keeps the fractions lets you follow the same trail Ramanujan and Kummer followed, one numerator at a time.
FAQs
What are Bernoulli numbers?
Bernoulli numbers are a sequence of rational numbers that come from the expansion of x / (e^x - 1). They are central to sums of powers and to the Euler-Maclaurin formula. Each number in the sequence is a fraction, and the calculator returns them exactly rather than as rounded decimals.
What is B(6)?
B(6) equals 1/42, which is 0.0238 in decimal. The calculator shows the exact fraction 1/42, so no rounding is involved. The decimal 0.0238 is only a convenience for readers who want a quick sense of the size of the value.
Why are the odd Bernoulli numbers zero?
Apart from B1, the odd terms vanish by the symmetry of the generating function. The even terms carry the information. That is why B(6) is 1/42 and B(12) is -691/2730, while the odd-indexed entries beyond B1 are simply zero.
What is B(12)?
B(12) equals -691/2730, about -0.2531. Its numerator 691 is a celebrated irregular prime. The calculator returns the exact fraction -691/2730, and the decimal -0.2531 is given only as a convenient approximation of that exact value.
How are they computed exactly?
Here they are computed by the Akiyama-Tanigawa algorithm, which works with exact fractions throughout, so nothing is rounded. Because every step stays in exact fraction form, the result for a value such as B(6) is precisely 1/42, not a floating-point approximation.
Where do Bernoulli numbers appear?
Bernoulli numbers appear in Faulhaber's formula for sums of powers, in Euler-Maclaurin summation, and in the values of the Riemann zeta function at even integers. These are the main places the sequence shows up, which is why exact values such as B(6) = 1/42 and B(12) = -691/2730 matter.