We deduce an explicit closed formula for the zeta-regularized spectral determinant of the Friedrichs Laplacian on the Riemann sphere equipped with arbitrary constant curvature (flat, spherical, or hyperbolic) metric having three conical singularities of order β j ∈ (−1, 0) (or, equivalently, of angle 2π(β j +1)). We show that among the metrics of (fixed) area S and (fixed) Gaussian curvature K, the one with β 1 = β 2 = β 3 = SK 6π − 2 3 corresponds to a stationary point of the determinant. As a crucial step towards obtaining these results we find a relation between the determinant of Laplacian and the Liouville action introduced by A. Zamolodchikov and Al. Zamolodchikov in connection with the celebrated DOZZ formula for the three-point structure constants of the Liouville field theory. The Liouville action satisfies a system of differential equations that can be easily integrated.