We assess economic costs of heat-induced reductions in worker productivity at global scale under RCP2.6 and RCP8.5. Losses in worker productivity are calculated by using an empirically estimated epidemiological exposure-response function, and the associated economic costs are assessed by using a dynamic multi-region, multi-sector computable general equilibrium model. Autonomous mechanisation of outdoor work in agriculture and construction is implemented in the model. We find that under RCP8.5 by 2100, heat-induced reductions in worker productivity result in an average decline of 1.4% in global gross domestic product (GDP) relative to the reference scenario with no climate change. This is approximately 0.4 percentage points less than when no autonomous mechanisation is assumed. For comparison, measuring the economic costs using occupational health and safety recommendations leads to a 2.4% reduction in global GDP, which is substantially larger than when the epidemiological exposure-response function is used. Countries of Africa, South-East Asia, and South Asia are the worst affected by heat stress. However, economic costs could be substantially alleviated if a 2°C global warming target is achieved. Under RCP2.6, the average reduction in global GDP is only 0.5%. A large fraction of global mitigation costs of achieving the 2°C global warming target could be offset by the avoided adverse impacts of heat stress on worker productivity at higher warming levels.