Taxes on internet sales have created a small windfall for Pennsylvania, according to state officials — thanks to a U.S. Supreme Court ruling and the rapid growth of online retail.

The state’s Department of Revenue initially estimated that tax revenue from marketplace sales would total $50.5 million in the current fiscal year. But between the start of the fiscal year in July and the end of March, the state has raised $151.4 million.

Through the end of the current fiscal year, officials expect to earn $200 million — nearly four times more than initially expected.

Here’s how that happened.

How does Pennsylvania tax online sales?

Pennsylvania expanded sales taxes to online marketplaces with a law that Gov. Tom Wolf signed in 2017. Under that law, third-party sellers who use websites such as Etsy or Amazon Marketplace to facilitate their businesses have to collect sales taxes.

With the law’s passage, the state began notifying sellers and increasing enforcement of online sales taxes.

Prior to that law, Pennsylvania already taxed other online sales, including digital downloads such as purchases of e-books and music. (Those types of internet sales will raise an estimated $100 million in sales tax revenue in the current fiscal year in addition to the $200 million expected from online marketplaces, according to the state Independent Fiscal Office.)

What changed with a Supreme Court ruling?

The U.S. Supreme Court issued an opinion in June in South Dakota v. Wayfair, a case challenging South Dakota’s online sales tax law.

The ruling overturned a previous decision by the court requiring businesses to have a physical presence in a state in order to be subject to sales taxes.

In response to the June ruling, several states reviewed their laws or passed new legislation regarding online sales.

What did that mean for Pennsylvania?

In Pennsylvania, the Supreme Court ruling allowed the state’s Revenue Department to expand the interpretation of its own law.

The state “issued a tax bulletin outlining the Supreme Court’s decision and explaining that Pennsylvania’s sales tax nexus has been expanded to include businesses making at least $100,000 in annual Pennsylvania gross sales," according to Revenue Secretary Daniel Hassell’s testimony to the Pennsylvania House and Senate Appropriations Committees this year.

Matthew Knittel, director of the state’s Independent Fiscal Office, said the Supreme Court ruling, coming soon after Pennsylvania’s own law, likely helped raise awareness among sellers about collecting taxes.

“I have no doubt it boosted the revenue collections,” Knittel said.

Did the growing popularity of online sales play a role?

Knittel said “the explosive growth of internet sales” likely also boosted tax collections, working hand in hand with the Supreme Court ruling to substantially increase Pennsylvania’s sales tax collections.

That may be in part because officials have to work with two-year-old data to develop revenue estimates. Online shopping, meanwhile, is evolving quickly.

“Even in those two years, internet sales are just increasing exponentially," Knittel said.

How much of an impact does this have on the state’s overall revenue?

Online marketplace sales are still a small portion of total sales tax revenue.

Wolf’s budget projected $11.1 billion in total state sales tax revenue for the current fiscal year.

But because revenue reports often track growth in revenue sources compared to the previous fiscal year, the boost from online marketplace sales helps the sales tax revenue collections show substantial growth.

“It’s boosting the growth rate," Knittel said, "even though it’s a small portion of the total.”

What about other states?

Before the Supreme Court’s decision in South Dakota v. Wayfair, Pennsylvania officials said they were “one of a handful of states” that had tax requirements for online marketplaces.

That number has grown. New Jersey, for example, passed its own law for taxing online marketplace sales. That went into effect in November.

New Jersey officials had expected to raise $212 million in the current fiscal year. Unlike Pennsylvania, however, New Jersey is on track to raise less than initially projected. Jennifer Sciortino, a spokesperson for the Office of the Treasurer, said the estimate was revised in March to $60 million.

“This is primarily due to the fact that many large sellers were granted delays in implementation,” Sciortino said, “as allowed in the law.”