Using the properties of the transfer matrix of one-dimensional quantum mechanical systems, we derive an exact formula for the persistent current across a quantum mechanical ring pierced by a magnetic flux Φ as a single integral of a known function of the system's parameters. Our approach provides exact results at zero temperature, which can be readily extended to a finite temperature T . We apply our technique to exactly compute the persistent current through p-wave and s-wave superconducting-normal hybrid rings, deriving full plots of the current as a function of the applied flux at various system's scales. Doing so, we recover at once a number of effects such as the crossover in the current periodicity on increasing the size of the ring and the signature of the topological phase transition in the p-wave case. In the limit of a large ring size, resorting to a systematic expansion in inverse powers of the ring length, we derive exact analytic closed-form formulas, applicable to a number of cases of physical interest.