Compare laptop and desktop costs.
Comparing a laptop with a desktop on sticker price is misleading because they last different lengths of time. Annualising each — price divided by lifespan — puts them on the same footing, and desktops usually win because they last longer and are cheaper to upgrade. The correction that pushes back the other way is energy: a desktop drawing ninety watts more for six hours a day costs real money over seven years.
Annualised hardware cost
Annual cost = purchase price / expected lifespan in years
Energy adjustment
Desktop energy cost = extra watts x 6 hours x 365 days / 1000 x electricity rate
Better thermals reduce component stress, and parts are replaceable — a failing power supply, drive or graphics card can be swapped rather than condemning the machine. Laptops fail at the battery, hinge and soldered components.
Portability, which for many people decides the question outright. A desktop that cannot come to a meeting or a coffee shop may be cheaper and still be the wrong choice.