How far away is Mars?

Mars is currently 2.24 astronomical units away.

We tend to think of places as being a fixed distance from one another, and this works on scales terrestrial (it's 3,459 miles from London to New York) and cosmic (it's 4.36 light years to Alpha Centauri). But within the solar system, things change quicker. John D. Cook offers the code to let you calculate Mars' distance from Earth at any given time. [via Hacker News]

Some interesting take-home facts for the laymen among us: the two worlds orbit anticlockwise; Martian years last 687 days, and the is Earth traveling about 20% faster to boot; and there is no evidence that Mars needs women, though it does show evidence of running water.

Here's code for all the planets, sans the useful explanation.

Make it easy on yourself with this solar system visualizer.