Even as contractors increasingly say declining federal spending is hurting their bottom lines, the companies that help businesses sell to the federal government are growing.

Take Herndon-based Deltek, one of the largest and best-known of the bunch. The company, which provides software geared to government contractors and professional services firms as well as market analysis, last week reported its balance sheet moved into the black in the most recent quarter.

The company said its profit reached $4.2 million (6 cents a share) in the three-month period ended June 30, up from a loss of nearly $3 million (5 cents a share) in the same period a year earlier. Revenue dipped just over 2 percent to $86 million, but the company said its sales from government contracting product bookings — or new deals that will provide future revenue — grew by more than 20 percent over the previous quarter.

The company said it expects total product bookings revenue to continue to grow by more than 20 percent in the third quarter as well.

“With the current uncertainties surrounding federal spending, contractors are understandably assessing the impact of potential federal budget cuts on their businesses,” Kevin Parker, Deltek’s president, chairman and chief executive, said. “Across the board, we’re seeing that this pressure is driving the need for solutions that lower costs and deliver better information to successfully execute the contracts they have and successfully compete for new business.”

Tom Mazich, who manages Deltek’s government contracting-focused business, said the company is also seeing its pipeline of work grow. “We see just the renewed vigor in customers looking to win business,” he said.

At the same time, McLean-based ImmixGroup, which helps commercial technology firms win government work, is growing. The company announced earlier this year that it has expanded its office space by 35 percent and made room for 130 more employees.

The company now has about 56,000 square feet in Tysons Corner.

Steve Charles, executive vice president, said the company generally works with commercial technology makers, with 10 to 20 percent of their business selling to the government.

While spending uncertainty has been disruptive, he said the company expects commercial technology to become increasingly important to the government as it seeks cost-saving alternatives.

“Our government customer is asking to see results for their IT investments in the three- to six-month time frame,” he said. More traditional contracting “programs that could go on for years ... that’s what’s getting cut.”

Others, too, are building up. Herndon-based Privia, which sells software to help contractors manage the bid and proposal process, is adding employees and particularly beefing up its professional services business. The company recently hired Amy McGeady, who has run her own business and worked at Lockheed Martin, as vice president of professional services.