Abstract. The Mittag-Leffler (ML) function plays a fundamental role in fractional calculus but very few methods are available for its numerical evaluation. In this work we present a method for the efficient computation of the ML function based on the numerical inversion of its Laplace transform (LT): an optimal parabolic contour is selected on the basis of the distance and the strength of the singularities of the LT, with the aim of minimizing the computational effort and reduce the propagation of errors. Numerical experiments are presented to show accuracy and efficiency of the proposed approach. The application to the three parameter ML (also known as Prabhakar) function is also presented.Key words. Mittag-Leffler function, Laplace transform, trapezoidal rule, fractional calculus, Prabhakar function, special function.AMS subject classifications. 33E12, 44A10, 65D30, 33F05, 26A33, 1. Introduction. The Mittag-Leffler (ML) function was introduced, at the beginning of the twentieth century, by the Swedish mathematician Magnus Gustaf Mittag-Leffler [24,25] while studying summation of divergent series. Extensions to two [41] and three [31] parameters of the original single parameter function were successively considered; all these functions can be regarded as special instances of the generalized hypergeometric function investigated by Fox [9] and Wright [43].Until the 1960s, few authors (e.g., [19]) recognized the importance of the ML function in fractional calculus and, in particular, in describing anomalous processes with hereditary effects [1,4,5,8]. For an historical outline and a review of the main properties of the ML function we refer to [17,23] and to the recent monograph [15].For any argument z ∈ C, the ML function with two parameters α, β ∈ C, with ℜ(α) > 0, is defined by means of the series expansion where Γ(z) = ∞ 0 t z−1 e −t dt is the Euler's gamma function; since the integral representation of Γ(z) holds only for ℜ(z) > 0, the extension to the half-plane ℜ(z) ≤ 0, with z ∈ {0, −1, −2, . . .}, is accomplished by means of the relationship Γ(z + n) = z(z + 1) · · · (z + n − 1)Γ(z), n ∈ N, [20,22].As a special case, the ML function with one parameter is obtained for β = 1, i.e. E α (z) = E α,1 (z), whilst the generalization to a third parameter γ E γ α,β (z) = 1 Γ(γ)is recently receiving an increasing attention due to the applications in modeling polarization processes in anomalous or inhomogeneous materials [3].In this work we restrict our attention to real parameters α, β and γ, with α > 0 and γ > 0, since they are of more practical interest. * This work has been supported under the GNCS -INdAM Project 2014.† Università degli Studi di Bari "Aldo Moro", Dipartimento di Matematica Via E. Orabona n.4, 70125 Bari, Italy (roberto.garrappa@uniba.it) 1 2 R. GARRAPPAWith the exception of a few special cases in which the ML function can be represented in terms of other elementary and special functions, as for instance E 1,1 (z) = e z , E 2,1 (z 2 ) = cosh(z), E 2,1 (−z 2 ) = cos(z) and E 1 2 ,1 (±z 1/2 ) = e z ...