We present two algorithms, one quantum and one classical, for estimating partition functions of quantum spin Hamiltonians. The first is a DQC1 (deterministic quantum computation with one clean qubit) algorithm. The second, for real temperatures, achieves performance comparable to a state-of-the-art DQC1 algorithm [A. N. Chowdhury, R. D. Somma, and Y. Suba, Phys. Rev. A 103, 032422 (2021)]. Both our algorithms take as input the Hamiltonian decomposed as a linear combination Pauli operators. We show this decomposition to be DQC1-hard for a given Hamiltonian, providing insight into the hardness of estimating partition functions.