CONCORD, N.H. — Planet Fitness is threatening to move its headquarters out of the state, taking hundreds of jobs with it, if the Legislature doesn’t change a tax law ahead of its anticipated initial public offering.

The fitness company, based in Newington, said Tuesday it had filed paperwork with the U.S. Securities and Exchange Commission this week to go public. But company officials say existing state tax law will put an unfair burden on it once it begins selling shares publicly.

The Senate Finance Committee gave initial approval to a bill that would change the tax law Wednesday. Senate President Chuck Morse, a Republican, said he hopes to continue working on the change during the next month. Officials from the Department of Revenue Administration warned lawmakers of its potential negative effects.

Planet Fitness has more than 900 gyms nationwide. Its headquarters employs between 150 and 175 people, but that number is expected to grow as the company expands, counsel Richard Moore said, and lawmakers are putting potential job losses at 500.

“This isn’t an idle threat,” Moore said. “We’ve had conversations with other states.”

Planet Fitness is organized as a limited liability company in New Hampshire. Under existing law, the company would effectively pay more in business profits tax when its partners sell off their shares. The change Planet Fitness is seeking would protect it from paying more in business taxes when it first goes public.

Planet Fitness did not say how many shares it would offer, what the stock would be priced or how much money it plans to raise. It also did not say when it expects the IPO to happen.