It’s become a formula for Broadway success: Pick a well-known play, cast a star, limit the run to drive up demand and watch box office take off.

But as Broadway’s current crop of plays now achieve profitability (or fail to), the lineup of recent hits vs. misses serves as a stark reminder that star casting isn’t the only variable in the math of a nonmusical success.

When Tony winning new play “Vanya and Sonia and Masha and Spike” recouped earlier this week, it became the fifth non-tuner of the 2012-13 season to make it into the black so far. That’s an unusually high number, but one that’s balanced by the fact that the 2012-13 slate included a whopping 26 plays — a record, according to the Broadway League.

Take a look at what worked and what didn’t last season, and it becomes obvious that in most cases it requires more than just a big name on the marquee to draw crowds. For proof, look no further than Alec Baldwin starrer “Orphans,” Scarlett Johansson topliner “Cat on a Hot Tin Roof,” Katie Holmes outing “Dead Accounts” and Paul Rudd project “Grace,” all of which closed in varying shades of the red.

Admittedly, some of the shows that succeeded hewed close to the formula, starting with “Glengarry Glen Ross,” the $3.3 million offering that cast proven sales juggernaut Al Pacino in a well-known David Mamet play with which the actor was already associated thanks to his starring role in the 1992 movie. The revival’s mixed reviews didn’t matter to the auds who made it one of the breakout sellers of the fall.

This spring, Tom Hanks topliner “Lucky Guy” (capitalized at $3.6 million) and Bette Midler vehicle “I’ll Eat You Last” ($2.4 million) tweaked the standard recipe, in that both titles were new plays rather than revivals with familiar titles.

That’s a risk, as underscored by “Dead Accounts” and “Grace,” both new works with casts that featured seemingly bankable stars. It turns out only a few thesps can spur boffo box office regardless of the play and its critical reception, and in steering their respective shows into profit, Hanks and Midler join an elite group that also includes Julia Roberts, Denzel Washington and Hugh Jackman.

Even though the fall revival of “The Heiress” (price tag: $3 million) also made it into the black, topliner Jessica Chastain hasn’t yet broken into that circle. The show, which generally posted middling sales, seemingly benefited not only from being a revival of a play based on a classic novel (Henry James’ “Washington Square”), but also from a coincidence of timing: The production’s final weeks coincided with a burst of “Zero Dark Thirty” Oscar publicity for then-nominee Chastain, who simultaneously attracted press as the star of “Mama,” the horror pic that opened surprisingly strong in January.

Making back its $2.75 million capitalization in 17 weeks, “Vanya and Sonia” might have been the riskiest proposition of the bunch. It’s a new title — the latest by Christopher Durang, beloved in the legit world but not well-known outside of it — and while its stars David Hyde Pierce and Sigourney Weaver are familiar to TV and bigscreen auds, neither is a box office powerhouse.

But “Vanya and Sonia” benefited from a principle proven the prior season by “The Best Man”: Sometimes you don’t need a single, big-ticket thesp when you’ve got a critical mass of well-known faces.

“Best Man” turned into a solid hit with a cast that included Candice Bergen, Eric McCormack, Angela Lansbury, John Laroquette and, later in the run, Cybill Shepard, John Stamos and Kristin Davis. Similarly, both Hyde Pierce, star of rerun staple “Frasier,” and former “Alien” badass Weaver have achieved a degree of pop-culture prominence that, when combined, helped attract theatergoers to a new title even before the strong reviews came in.

Figure in the Tony win for new play, and “Vanya and Sonia” had a number of factors beyond its cast contributing to the show’s success.

Although stars aren’t solely responsible for any show’s sales, it seems likely that none of the hit plays of 2012-13 could have done it without a familiar name or two.

With the 2013-14 lineup of plays including Orlando Bloom in “Romeo and Juliet,” Daniel Craig and Rachel Weisz in “Betrayal,” Billy Crystal in “700 Sundays” and Patrick Stewart and Ian McKellen in “Waiting for Godot” and “No Man’s Land,” that seems to be a fact Broadway producers know well.