Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Logarithmic Integral Table Generated
61
rows of li(x)
li(x) at first x = 2 1.0451637801
li(x) at last x 7.7808255956
Increment (step) 0.2
x li(x)
2 1.045163780
2.2 1.315238277
2.4 1.555670529
2.6 1.774144569
2.8 1.975643343
3 2.163588595
3.2 2.340435501
3.4 2.508008074
3.6 2.667700254
3.8 2.820602553
4 2.967585095
4.2 3.109353940
4.4 3.246490415
4.6 3.379479255
4.8 3.508729195
5 3.634588310
5.2 3.757355650
5.4 3.877290192
5.6 3.994617821
5.8 4.109536844
6 4.222222391
6.2 4.332829965
6.4 4.441498332
6.6 4.548351889
6.8 4.653502627
7 4.757051766
7.2 4.859091126
7.4 4.959704282
7.6 5.058967552
7.8 5.156950827
8 5.253718300
8.2 5.349329078
8.4 5.443837726
8.6 5.537294730
8.8 5.629746904
9 5.721237753
9.2 5.811807780
9.4 5.901494770
9.6 5.990334030
9.8 6.078358612
10 6.165599505
10.2 6.252085806
10.4 6.337844881
10.6 6.422902499
10.8 6.507282963
11 6.591009216
11.2 6.674102950
11.4 6.756584697
11.6 6.838473910
11.8 6.919789044
12 7.000547621
12.2 7.080766300
12.4 7.160460927
12.6 7.239646596
12.8 7.318337695
13 7.396547948
13.2 7.474290462
13.4 7.551577760
13.6 7.628421821
13.8 7.704834106
14 7.780825596

What is the logarithmic integral li(x)?

The logarithmic integral, written \(\operatorname{li}(x)\), is a special function defined by the integral of \(1/\ln(t)\) from 0 to \(x\). Because the integrand has a singularity at \(t = 1\), for \(x > 1\) the integral is taken as a Cauchy principal value. The function is central to analytic number theory: the Prime Number Theorem states that the prime-counting function \(\pi(x)\) is asymptotic to \(\operatorname{li}(x)\), and \(\operatorname{li}(x)\) is one of the best simple approximations to the number of primes below \(x\). This calculator uses the offset-free definition \(\operatorname{li}(x)\) (lower limit 0), not the Eulerian variant \(\operatorname{Li}(x) = \operatorname{li}(x) - \operatorname{li}(2)\).

Curve of li(x) crossing zero near x=1 and rising, with shaded area under 1/ln t
The logarithmic integral \(\operatorname{li}(x)\) has a singularity at \(x=1\) and rises slowly for large \(x\).

How to use this calculator

Enter three values: the initial value of \(x\), the increment (step) added at each row, and the number of iterations (rows). The tool builds a table where row \(i\) has $$x = \text{startX} + i \times \text{step},$$ and the matching value \(\operatorname{li}(x)\). A line graph of \(\operatorname{li}(x)\) versus \(x\) is also produced. For meaningful real output choose a start above 0; the common default range is startX = 2, step = 0.2, 61 iterations, which tabulates \(x\) from 2.0 up to 14.0.

The formula explained

We evaluate $$\operatorname{li}(x) = \operatorname{Ei}(\ln x),$$ where \(\operatorname{Ei}\) is the exponential integral. \(\operatorname{Ei}(z)\) is summed with the convergent series $$\operatorname{Ei}(z) = \gamma + \ln|z| + \sum_{k=1}^{\infty}\frac{z^{k}}{k\cdot k!},$$ where \(\gamma = 0.5772156649\dots\) is the Euler-Mascheroni constant. The series is accumulated until each term is negligible relative to the running sum. Edge cases follow the standard conventions: \(x \le 0\) returns 0, and \(x = 1\) returns negative infinity (the singularity).

Shaded area under the curve 1/ln t from 0 to x illustrating the integral definition
\(\operatorname{li}(x)\) is the signed area under \(1/\ln t\) from 0 to \(x\).

Worked example

For \(x = 2\), \(z = \ln 2 = 0.6931472\). Summing \(\gamma + \ln|z| +\) the series gives $$\operatorname{Ei}(0.6931472) = 1.0451638,$$ so \(\operatorname{li}(2) = 1.04516378011749\), matching the published reference value. The single positive real root of \(\operatorname{li}(x)\) is at \(x = 1.45136923488\) (the Ramanujan-Soldner constant), where \(\operatorname{li}(x) = 0\).

FAQ

Why does \(\operatorname{li}(x)\) blow up near \(x = 1\)? The integrand \(1/\ln(t)\) is singular at \(t = 1\), so \(\operatorname{li}(1) = -\infty\) and the function changes rapidly around that point.

Is this \(\operatorname{li}(x)\) or \(\operatorname{Li}(x)\)? This is the un-offset \(\operatorname{li}(x)\) with lower limit 0. The offset version \(\operatorname{Li}(x)\) subtracts \(\operatorname{li}(2)\).

What if my start is 0 or negative? For \(x \le 0\) the real logarithmic integral is not defined, so the calculator returns 0 for those rows.

Last updated: