If you are building this manually, here is the logic behind the Excel formulas:
Sheet: Leakage & regulation
Use a simplified thermal model: