A marathon is 26 miles, 385 yards (approximately 26.2 miles or 42.2 km). But, it hasn't always been that distance.
The name marathon originates from the legend of Pheidippides. Pheidippides was a Greek soldier dispatched from the town of Marathon to Athens to announce that the Greek had defeated the Persians in battle there. Marathon is about 25.4 miles (40.8 km) from Athens. It is said that Pheidippides ran the whole distance and then collapsed and died upon delivering the news of victory.
The first marathon event at the modern Olympics was run over a distance of 40 km (24.85 miles). Over time the distance was changed to 26 miles. However, at the 1908 Olympics, an extra 385 yards was added to the course so that the royal family would have a better view of the finish line from their royal box. This new distance was adopted by International Association of Athletics Federations (IAAF) as the official marathon distance.
So, I have Pheidippides and the royal family to blame for the extreme challenge I plan to put myself to. As Frank Shorter (1972 Olympic marathon gold medal winner) once said at the 16-mile mark of one of his first marathons, "Why couldn't Pheidippides have died here?"