Over the past few weeks, as the Diamondbacks’ playoff push has unfolded, right fielder Corbin Carroll has taken a levelheaded approach. While encouraged by his team’s play and heartened by how valuable the pennant race experience could be for the club going forward, Carroll has remained, at most, cautiously optimistic about the team’s chances of actually playing in October.

Even as the Diamondbacks enter the final week of the season — they sit one game back of the New York Mets and Cincinnati Reds with six games to play — Carroll’s outlook hasn’t changed much.

“I still think,” he said, “that a lot has to go right for us.”

Carroll is not wrong.

The Diamondbacks have the toughest schedule, on paper, of the three teams. They also, of course, have ground to make up. The Reds and Mets own identical 80-76 records. The Diamondbacks are a game behind at 79-77.

Here is a look at what needs to happen for the Diamondbacks to get to October.

(We are assuming here that the San Diego Padres (85-71) soon will be the second team to clinch a wild-card spot in the National League and that the San Francisco Giants (77-79), St. Louis Cardinals (76-80) and Miami Marlins (76-80) are too far behind.)

Diamondbacks vs. Mets

If the Diamondbacks and Mets end up with the same record with the Reds behind them, the wild-card winner would be determined by a tiebreaker, the first one being head-to-head record.

Since the Diamondbacks and Mets split their six-game season series, a second tiebreaker, division record, would come into play. That would favor the Diamondbacks. There is no way for the Diamondbacks to catch the Mets without also having a better division record.

That means the Diamondbacks only have to draw even with the Mets while also moving past the Reds.

Diamondbacks vs. Reds

If the Diamondbacks and Reds finish in a tie with the Mets behind them, the Diamondbacks would lose the tiebreaker to the Reds, who took four of six games from them during the regular season.

That essentially means the Reds have a two-game lead on the Diamondbacks entering the week.

Diamondbacks vs. Reds vs. Mets

What happens if there’s a three-way tie? The first tiebreaker is if one team won the season series against each of the other two. And one of these three teams did: the Reds.

So if the Diamondbacks, Mets and Reds end with identical records, the Reds would claim the final wild-card spot.

How do the schedules compare?

Strength of schedule isn’t everything; consider that the Mets just dropped two of three to the Nationals. But it’s not nothing, either, and the Diamondbacks don’t look so well-positioned when it is taken into account.

The Diamondbacks have a series remaining against a pair of likely playoff teams, the Dodgers and Padres. The Reds have three against the Pirates, followed by three against the Brewers, who own the best record in the NL. The Mets have a series against the playoff-bound Cubs, followed by three against the Marlins.

The Diamondbacks, to be fair, have played competitively against contending clubs over the past couple of months.

If the Diamondbacks go …

Perhaps the more sobering way to look at it is with pure win/loss scenarios.

If the Diamondbacks were to go 5-1, they would need the Mets to go 4-2 and the Reds to go 3-3.

If the Diamondbacks went 4-2, they’d then need the Mets (3-3) and Reds (2-4) to sink even further. Anything worse than 4-2 would require an all-out collapse by both of the other teams.

No matter how it turns out, the Diamondbacks have had a strong second half, playing well enough to, against all odds, get themselves back into the race in a year in which they sold at the deadline.

But if they’re going to get to October, they are going to need help — just like Carroll said they would.

“It’s still definitely an uphill battle,” Carroll said. “But I like this group and I feel like we’ve got what it takes to, if we’re able to get in, to do our thing.”