Go ahead. Crunch the numbers.

When a team of Staples High School math whizzes dove into a pool of 1,128 teams in a national math competition, Staples odds coming up among six finalists were 188 to 1.

Yet the five-member Westport team will head to New York City on April 27 for the finals of Moody's Mega Math Challenge and a shot at $20,000 in scholarship prizes. The team earned the trip by balancing dollars and sense.

In the competition sponsored by Moody's Corp., the financial ratings agency, all of the entrants had to provide a cost-benefit analysis of higher education, Staples said in a news release.

The Staples team -- Chai Kim, Claudia Landowne, Claire Sampson, Madeline Schemel and Terrie Yang -- labored for 14 hours on a Saturday in late February, analyzing data on college tuition rates, scholarships and financing costs. They created mathematical models and wrote algorithms to determine the costs actually paid individuals of various socioeconomic groups, Staples said in a news release.

The team accounted for the impact of President Obama's proposal for the government to provide two years of community college for free, and it contrasted potential financial outcomes for those pursuing science-and-technology degrees vs. non-science-and-technology degrees.

The team also factored in overall quality of life after graduation, according to the release.

After two rounds of judging, the Staples analysis was picked for the contest finals along with two teams from Virginia, two from North Carolina and one from Minnesota.

When its coach, Kerrigan Warnock, takes the Staples squad to Moody's headquarters April 27, a team of professional applied mathematicians will judge its presentation against those of the five other finalists.

This is the 10th year Staples has entered the contest, but the 2015 team is the first made up entirely of girls. School officials were unable to confirm whether the squad is the first all-girl team in the history of the competition.

But John Wetzel, math department chair for grades six to 12, said that at Staples, there is nothing remarkable about females being interested in math. Women comprise more than half the school's mathematics staff, and girls routinely sign up for the most difficult math classes, he said.

"It's great (the team is) all girls. But we'd feel the same pride if the team were made up of all boys, or a mix," he said in the release. "This serves as another example of how we are excelling in STEM (Science, Technology, Engineering and Mathematics)."

The five other finalists, according to the contest website, are Elk River High School, Elk River, Minn; Maggie Walker Governors School, Richmond, Va; two teams from NC School of Science and Mathematics, Durham, N.C., and South County High School, Lorton, Va.

Staples won the Moody's championship in 2006, the contest's first year, and has finished fifth and sixth in other years, according to the release. The school also has garnered six honorable mentions.

Last year's contest asked participants to determine a student's caloric requirements based on his or her individual attributes, assess the percentage of U.S. students who meet the definition of an "average" student, and develop a budget-friendly lunch plan to satisfy nutritional standards and student palates.

Previous questions involved topics such as plastic waste in landfills and high-speed intercity rail transportation.