(Photo by Rob Carr/Getty Images)

Baseball is gearing up for what could be its most exciting stretch run in years. With 60 percent of the season complete, 15 teams — half the teams in baseball — are within two games of a playoff position. Nine teams are in first place in their division, as each division in the National League has two teams tied for first, and the rest are within spitting distance of a wild-card spot.

There are technically 10 playoff spots, but not really: The two Wild Card teams in each league will face off in a single-elimination play-in game for the right to take on one of the division winners in the first round. Only eight teams will play in the in that first round, which means that half the 15 teams on the bubble are going to be finished for the winter before the division series starts. As the July 31 trade deadline approaches, each of these teams will need to gut-check and decide whether to be a buyer or a seller, whether to go for it or to attempt to restock for 2015.

Of course, those 15 teams are not the only ones trying to make a tough decision about whether to throw in the towel. The Tampa Bay Rays and Boston Red Sox have talented rosters and had playoff hopes before the season began. But they’re tied for 7.5 games out of the division race and six games out of the wild-card race, behind three teams in their division and behind seven teams in the wild card.

The math is almost insuperably daunting. For example, the Baltimore Orioles sit at 53-44, a .546 winning percentage. If they maintain that for the rest of the year, they will finish 89-73. Therefore, to win 90 games, Boston would have to go 44-20 for the rest of the season, a .680 winning percentage; Tampa Bay would need to go 43-19, a .700 winning percentage. If Baltimore, New York, or Toronto got hot, then Tampa and Boston would need to catch an even more improbable run of success.

MLB wild card

It’s the same with the wild card. The 52-46 Seattle Mariners currently hold the second wild card spot. But the Red Sox and Rays don’t just need to beat Seattle’s performance until the end of the year. They also need to beat out the Royals, the Indians, the Yankees, and the Blue Jays, all of whom are ahead of them in the race. If a single one of those teams catches fire and wins 55 percent of its games, the Rays and Red Sox will need to win at least 65 percent of their games. If a team wins 60 percent of its games, the Red Sox and Rays’ slim playoff hopes essentially go to zero.

That’s why Fangraphs’ Dave Cameron is advising the Royals to throw in the towel and trade James Shields. The same argument can be made for the Rays and David Price, and most of all for the Phillies with their aces Cole Hamels and Cliff Lee, who returned to the mound last night after a two-month stint on the disabled list. Each of them is a better pitcher than Jeff Samardzija, whom the Athletics acquired on July 4 by trading their top prospect, Addison Russell. Even though they may only pitch 12 starts with their new team, each is capable of swinging a race by himself, considering how many teams are within two games of each other.

By the beginning of August, it’s a good bet that many of them will be gone. And the landscape will look very different for the teams that were unable to swing a deal.