Mercury orbits closer to the Sun, but Venus has a dense atmosphere that traps heat. This makes Venus the hottest planet in our solar system. Distance from a star is only one of the factors that influence planetary temperature.
Distance is only half the story
Mercury is the planet nearest the Sun, yet its very thin exosphere does not retain heat like the thick atmosphere of Venus. Temperature on Mercury changes enormously between day and night. Venus instead maintains an extremely hot surface beneath an opaque cloud cover and a massive carbon-dioxide atmosphere.
Energy enters; heat tries to escape
Incoming solar energy and outgoing thermal radiation balance over long periods. An atmosphere modifies the relationship between the surface and outer space: some wavelengths pass through easily while others are absorbed and re-emitted. The extraordinary atmospheric conditions of Venus keep its surface much warmer than a calculation based only on distance would suggest.
Compare worlds like a planetary scientist
A planet’s reflective clouds, atmospheric composition, pressure, rotation and surface material all matter. Even a world that resembles Earth in approximate diameter can have a radically different climate. The comparison between Venus and Mercury is a good reminder to look at a whole system rather than one statistic.
Think about it: Is Venus hotter because it is larger than Mercury?
Size alone does not explain the result. Its massive atmosphere is a crucial difference. Worlds of similar size can have very different surfaces and climates.
Read more: NASA: Venus facts · NASA: Extreme surface conditions on Venus.