We present an analytic five-loop calculation for the additive renormalization constant A(u, ǫ) and the associated renormalization-group function B(u) of the specific heat of the O(n) symmetric φ 4 theory within the minimal subtraction scheme. We show that this calculation does not require new fiveloop integrations but can be performed on the basis of the previous five-loop calculation of the four-point vertex function combined with an appropriate identification of symmetry factors of vacuum diagrams. We also determine the amplitude function F + (u) of the specific heat in three dimensions for n = 1, 2, 3 above T c and F − (u) for n = 1 below T c up to five-loop order, without using the ǫ = 4 − d expansion. Accurate results are obtained from Borel resummations of B(u) for n = 1, 2, 3 and of the amplitude functions for n = 1. Previous conjectures regarding the smallness of the resummed higherorder contributions are confirmed. Combining our results for B(u) and F + (u) for n = 1, 2, 3 with those of a recent three-loop calculation of F − (u) for general n in d = 3 dimensions we calculate Borel resummed universal amplitude