This paper theoretically shows that changes in the distance elasticity of trade can be connected to welfare changes that depend on bilateral distance measures and expenditure shares of countries. Empirical results based on international and domestic trade data from the last two centuries show that the negative effects of distance on trade have increased over time when zero trade observations are ignored in inconsistent OLS estimations, confirming the distance puzzle in the literature. The corresponding welfare implications suggest that the world economy has experienced a cumulative welfare loss (about ) due to this puzzle in the last two centuries. When the puzzle is solved by considering zero trade observations in PPML estimations, the tables turn such that there are significant welfare gains from trade (about ) during the same period due to the decreasing negative effects of distance on trade over time. Welfare gains from further reductions in the negative effects of distance are investigated as well, suggesting significant potential gains from trade in the future.