How is the tax penalty figured?

How is the tax penalty for underpayment in 2024 figured?