Often a comparison is made about the cost of electricity, a valid comparison. But, there's more.
How much space does this cost?
This is a desktop vs laptop, and or, a location vs location argument.
A desktop case takes around 0.2m2 floor space. Now, for simplicity's sake as San Francisco is often incorrectly assumed to be where most readers of HN live, but given that we're all somewhat versed in SF prices: A 1 bedroom, say 60m2, apartment costs about $3000. So, that desktop case is costing about $10 per month in floor space. That's $120 per year, or $600 for 5 years. Quickly adds up!
You could run the numbers for where you live. While a desktop could be put under a desk and may not initially factor in as an explicit cost, everything is at the opportunity cost. Say, your legs, or a houseplant, neither of which cost anything in electricity or upfront cost.
(Written on an 11 year old X220 with an i3 processor.)