Text this: A general derivation and quantification of the third law of thermodynamics