Local governments in Northern Virginia are bracing for millions of dollars in potential tax refunds to businesses after a Virginia Supreme Court ruling on how out-of-state receipts may be deducted from a company’s taxable income.

The refunds would mean tens of millions of dollars less in revenue in government coffers when budgets are already tight because of a weak commercial real estate market, a still-anemic local economy and the ever-growing demands for new and better schools and other services.

In Fairfax County, which is already facing eight appeals, the likely impact is at least $30 million this year alone, officials said. Officials in Arlington and Loudoun counties said they also expect to be hit with appeals that will generate several million dollars in business tax refunds.

“This clearly is a big issue,” said Susan Datta, budget director in Fairfax, home to dozens of global and national companies potentially affected by the ruling. “I don’t know how big it is.”

The court decision, issued last month, dealt with a 2012 Arlington County Circuit Court case centering on the state’s 200-year-old business, professional and occupational licenses tax. The tax is levied on all businesses as a percentage of gross receipts, and the rate varies with type of industry.

In the case, the Nielsen media company challenged Arlington’s decision to reject $25,279 in tax deductions claimed in 2007.

The dispute revolved around how Nielsen, which has offices in multiple states and countries, calculated tax deductions for gross receipts earned outside Virginia.

Arlington argued that Nielsen incorrectly deducted a portion of its out-of-state gross receipts that it had already excluded from its total amount of Virginia taxable income.

Nielsen countered that the deduction was allowed under a state formula that permits companies with offices outside Virginia to estimate tax deductions without proving where that income originated. The Virginia Supreme Court sided with Nielsen in January and ordered a circuit court judge to use Nielsen’s approach to calculate what the company owes the county.

Now tax consultants are advising their business clients in Virginia — particularly those that perform consulting or other hard-to-quantify services outside the state — to consider filing their own tax appeals.

KPMG, the international tax consultancy group, sent a January “news flash” about the ruling advising government contractors and other global and national businesses “to consider a refund claim.”

Although every city in Virginia and most major counties collect BPOL taxes, the impact of the court decision will probably be felt most deeply in Northern Virginia, where the biggest and most globally oriented companies operate, tax consultants say. Fairfax, in particular, is preparing for a substantial blow.

The county expects to use a $30 million emergency litigation fund to deal with eight tax appeals likely to be affected by the Virginia Supreme Court’s ruling. The appeals were filed before the ruling.

TASC stands to recoup $3.51 million and Leidos $13.6 million — the amounts cited in two circuit court lawsuits filed last year that appealed taxes dating to 2008.

“I’m feeling pretty good about our chances,” said Craig D. Bell, an attorney with the McGuireWoods law firm who is representing those two companies and the SI Organization , which is seeking a refund of $616,175.

Under state law, a business has the right to appeal for three years’ worth of tax refunds.

The anticipated payouts have sparked some worries among Fairfax officials over depleting their emergency funds in a way that could jeopardize the county’s AAA bond ratings, which could lead to higher interest rates on county debt. To address concerns raised by Wall Street rating agencies, the county has been working to boost emergency budget reserves.

“We really need to address it going forward and increase our reserves,” said Pat Herrity (R-Springfield) of the County Board of Supervisors. He said the county is not sure how much more it would have to pay if additional companies file appeals.

Board of Supervisors Chairman Sharon Bulova (D) said one option would be to raise BPOL tax rates across the board — a move that would probably stir resistance from the Fairfax County Chamber of Commerce.

Currently, the county’s BPOL tax rate for major companies is between 4 cents and 31 cents per $100 in receipts, depending on the type of business — slightly less than half the maximum allowed by the state. Fairfax collects about $147 million in BPOL taxes annually.

“This is something we’ll be talking to the chamber about,” Bulova said. “We have taken the rating agencies’ cautionary concerns very, very seriously.”

Jim Corcoran, president of the Fairfax County Chamber of Commerce, said the BPOL tax should be simplified — or eliminated — to avoid disputes.

Other local governments said they’re also preparing to find ways to come up with the extra funds for potential tax refunds.

“I don’t know what the number will look like, but I can tell you it will be in the millions of dollars,” said Michelle Cowan, Arlington’s chief financial officer. The county, which collects $50 million in BPOL taxes, is facing several appeals from major employers, officials said.

Raymond Warren, legal counsel for Arlington’s Office of the Commissioner of Revenue, said area officials will know the full impact when companies begin seeking to recoup tax dollars that have already been earmarked for government programs and other services.

“It all has to be paid in the same year, and there’s an interest rate involved” of about 10 percent, said Warren, who represented Arlington in the court case against Nielsen. “It’s significant because it was unplanned for.”