"Hidden Figures" — a historical drama about three black female mathematicians — is not the kind of movie Hollywood looks to for lavish box-office returns.

Yet the modestly budgeted $25 million drama has shot past $125 million and is the best word-of-mouth title (judged by audience retention) at the multiplex. The Oscar-nominated movie has left audiences in tears, and Hollywood scrambling to explain its success.

Perhaps the best explanation comes from Margot Lee Shetterly, who wrote the book on which the nonfiction movie is based.

All Americans, she writes, want to believe in the "triumph of meritocracy, that each of us should be allowed to rise as far as our talent and hard work can take us." This story of three women (played by Taraji P. Henson, Octavia Spencer and Janelle Monáe) whose math and engineering skills allowed to them rise past obstacles of race, class and gender, and through the ranks of government aerospace workers to make contributions to Gemini and other missions, provides evidence of "something we believe to be true ... but don't always know how to prove."

Writer/director Theodore Melfi said he viewed his job as simple: "To be honest, just don't mess it up. Just tell the story. It's such an amazing tale. Everybody who hears about it has the same reaction: 'How is it I've never heard about this story?' "

Part of the reason is that it was classified. The women worked on top-secret projects. The United States was in a space race with the Soviet Union, and intelligence services kept a tight lid on the work at the Virginia facility where Katherine Johnson (Henson), Mary Jackson (Monáe) and Dorothy Vaughan (Spencer) worked as human "computers," making complex mathematical calculations necessary to blast a rocket into space.

In a quiet way, "Hidden Figures" conflates the space race with another ambitious national project: civil rights. The imperative of besting the Soviets has a NASA manager (played by Kevin Costner) looking for the best person for the job, even as that person is relegated to a segregated restroom and coffee pot.

Their persistence and excellence cause those obstacles to fall away and be exposed as irrational and counterproductive. "Hidden Figures" is a story of diversity wrapped in a classic American narrative of striving, augmented with touches of faith and family that add to its widespread appeal.

Something else struck Melfi when he met and interviewed Johnson. She deflected praise, turned it instead to her co-workers, and talked endlessly about "the team" at NASA. "I don't want this movie to be about me," she insisted.

Melfi said he "looked Johnson in the eye and said, 'We're going to do it right.' "

He's pleased by the response at the box office, of course. But even more rewarding for Melfi and company: the response from young people.

"Schools are taking students to see this movie. It's becoming part of the curriculum. We just had a free screening at USC for 8,000 inner-city high school students. They love the movie," he said, "I think because it allows them to see what's possible."