Exactly how far did the two golf balls travel that astronaut Alan Shepard of Derry famously hit on the moon in 1971 — 50 years ago — during an Apollo 14 mission?

Hint: not “miles and miles and miles” as Shepard described. According to NASA, he used the head of a 6-iron attached to the handle of a sample-collection tool to hit the two golf balls on Feb. 6, 1971.

British photographer and imaging specialist Andy Saunders worked with the United States Golf Association to analyze remastered photographs to get the exact distance. The conclusion: the first ball went 24 yards and the second 40 yards, according to the research released on Friday.

Saunders used high-resolution scans of the actual original flight film and other image enhancement techniques to come to the conclusion.

The makeshift golf club resides in the USGA Golf Museum.

Shepard graduated from Pinkerton Academy in 1940.

New Hampshire politicians and organizations paid tribute to Shepard and the Apollo 14 mission on social media over the weekend.

Shepard was the first American astronaut launched into space in 1961. Ten years later, he commanded NASA’s eighth crewed mission to the moon.

Apollo 14 launched on Jan. 31, 1971. Shepard and crewmate Edgar Mitchell landed on the lunar surface on Feb. 5, and Shepard, Mitchell and command module pilot Stuart Roosa returned to earth with a splashdown in the Pacific Ocean on Feb. 9.

Manchester-Boston Regional Airport wrote about the “two golf shots heard ‘round the galaxy” on Friday.

“As a young boy, Shepard rode his bike to #MHT to sweep out hangars in exchange for flight lessons. You never know where your career might take you! #FromManchesterToTheMoon,” a tweet read.

U.S. Sen. Jeanne Shaheen wrote on Twitter: “50 years ago today, NH native Alan Shepard walked on the moon. Also the first American in space, his legacy shines bright in the Granite State. Proud to claim him as one of our own & honor his groundbreaking career.”

Sen. Maggie Hassan also offered a tribute.

“I’m celebrating his and his team’s explorational spirit – we should all take their lead and shoot for the stars,” she wrote on Twitter.

The Derry Fire Department posted two pictures of Shepard on Facebook.

“50 years ago today Derry Native and Apollo 14 commander, Alan B. Shepard, famously hit two golf balls on the surface of the Moon on February 6, 1971!