The $238 million record purchase was a visceral reminder that when wealthy buyers like Mr. Griffin purchase expensive apartments as second homes or investments, New York City and the state get less financial benefit than if the home were owned as a primary residence. If the buyers live out of state, they are not subject to state or city income taxes, and do not pay New York sales tax while outside the state.

Under the Senate’s bill, a pied-à-terre tax would institute a yearly tax on homes worth $5 million or more, and would apply to homes that do not serve as the buyer’s primary residence.

It was not immediately clear how much money the tax would raise; the office of the city comptroller, Scott M. Stringer, estimated that a pied-à-terre tax would bring in a minimum of $650 million annually if enacted today. And based on the expected revenue stream, Mr. Cuomo estimated that the state could then raise $9 billion in bonds, backed by the expected taxes paid by pied-à-terre owners.

The State Senate and Assembly were expected to include a version of the tax in budget proposals that are set to be released this week, although the exact details were still to be ironed out. And given the often-tumultuous process of negotiating the state budget, which is due April 1, it remains possible that the tax may not get approved this year.

But according to Senate leaders, the tax is long overdue.

“It is great that with a united Democratic Legislature and support from the governor, we can finally get this done,” said Mike Murphy, a spokesman for the Democratic majority in the Senate, adding that a tax on “ultrarich second homeowners in New York City is common sense and something we have supported for years.”