The Constitution is not a math problem, but numbers can play a role in the Supreme Court’s calculations. When the court struck down bans on interracial marriage in 1967, such unions were still illegal in 16 states. When the court struck down laws making gay sex a crime in 2003, 13 states still had anti-sodomy measures. Should the court take up the question of same-sex marriage this term or next, as it seems likely to, the unions will be against the law in no more than 15 states.

“The coincidence is hard to miss,” said Susan Sommer, a lawyer with Lambda Legal who has been litigating same-sex marriage cases for more than a decade. In a brief urging the Supreme Court to hear a same-sex marriage case from Ohio, lawyers for several couples recited the history and pushed the comparison. “The current landscape for marriage recognition for same-sex couples,” the brief said, “looks much the same as it did in 1967 for interracial couples and in 2003 for same-sex intimate partners.”

Walter Dellinger, an acting solicitor general in the Clinton administration, noted another touchstone. In 1954, when the Supreme Court ruled that segregated public schools violated the Constitution, 17 states still required that children be separated by race. “Historically, there seems to be a tipping point at which the justices seem more comfortable setting aside state practices,” he said. “When only a third of the states still retain a practice, the court seems ready to act.”

The stunning recent run of victories for same-sex marriage, by contrast, has mostly been the work of judges rather than voters or their elected representatives. In the past two months, the number of states allowing same-sex marriage grew to 35 from 19, as well as the District of Columbia. The surge was entirely the result of court decisions.  The Supreme Court’s most conservative members, Justices Antonin Scalia and Clarence Thomas, have been relatively ambiguous, but are showing positive signs of state populism in favor of same-sex marriages.

The two justices noted dissents this month from the Supreme Court’s refusal to block same-sex marriages in Kansas and South Carolina. And Justice Thomas, joined by Justice Scalia, issued an intriguing statement on Nov. 13 in an immigration case. “We often review decisions striking down state laws, even in the absence of a disagreement among lower courts,” he wrote, citing the 2012 decision to hear a same-sex marriage case from California. “But for reasons that escape me,” Justice Thomas continued, “we have not done so with any consistency, especially in recent months,” citing the court’s Oct. 6 orders.

“There was a palpable sense,” Mr. Dellinger said, “that justices sympathetic to the gay rights cause were not eager to take on more than 40 states.” The court ducked the question that time, ruling instead that the parties before them lacked standing to appeal. “When the issue comes back again, much of the country will have become a friendlier place for gay marriage,” Mr. Dellinger said. “And that will surely be helpful.”  As such, these are encouraging signs that the tables are turning in favor of same-sex marriages.