We present a quantum algorithm to compute the discrete Legendre-Fenchel transform. Given access to a convex function evaluated at N points, the algorithm outputs a quantum-mechanical representation of its corresponding discrete Legendre-Fenchel transform evaluated at K points in the transformed space. For a fixed regular discretizaton of the dual space the expected running time scales as O(κ polylog(N,K)), where κ is the condition number of the function. If the discretization of the dual space is chosen adaptively with K equal to N, the running time reduces to O(polylog(N)). We explain how to extend the presented algorithm to the multivariate setting and prove lower bounds for the query complexity, showing that our quantum algorithm is optimal up to polylogarithmic factors. For certain scenarios, such as computing an expectation value of an efficiently-computable observable associated with a Legendre-Fenchel-transformed convex function, the quantum algorithm provides an exponential speedup compared to any classical algorithm.