Exact Heat Capacity Formula