By Xavier Fontdegloria

Small-business owners confidence in the U.S. economy increased in August, outpacing expectations, according to data from a survey compiled by the National Federation of Independent Business showed Tuesday.

The NFIB Small Business Optimism Index came in at 100.2 in August, a 1.4 points increase compared with July's 98.8 reading and slightly above the historical 46-year average. Economists polled by The Wall Street Journal had expected a lower level of 99.1.

The NFIB is a monthly snapshot of small businesses in the U.S., which account for nearly half of private sector jobs. Economists look to the report for a read on domestic demand and to extrapolate hiring and wage trends in the broader economy.

The indicator, which plunged in March to a seven-year low as the coronavirus pandemic hit the economy, has regained part of the lost ground as businesses reopened. However, confidence slightly fell again in July amid the resurgence in Covid-19 infections across the country.

Before the pandemic hit the U.S., the NFIB Index stood at 104.5.

August's results, based on 751 companies polled, saw monthly increases in seven of the 10 index components, while two declined and one was unchanged.

Earnings trends over the past three months improved seven points, although the component remained in a net negative 25% of owners reporting quarter on quarter profit improvement.

Among firms reporting weaker profits, 55% blamed weak sales. "The main factor driving profits is sales, where prospects are not good for the balance of the year in the current environment," the report said.

Job creation plans increased three points to a net 21% and job openings also grew by three points to 33% of firms with at least one unfilled position.

The percentage of owners thinking it is a good time to expand increased one point to 12%.

The net percentage of owners reporting inventory increases improved two points to a net negative 9%, and plans to increase inventories also rose by two points to a net 6%.

"We are seeing areas of improvement in the small business economy, as job openings and plans to hire are increasing, but many small businesses are still struggling and are uncertain about what the future will hold," NFIB's chief economist Bill Dunkelberg said in prepared remarks.

The component gauging plans to make capital outlays remained unchanged from July at 26%. Expectations among small-business owners regarding the improvement of the economy and of higher sales both fell, data showed.

Performance was uneven among sectors, with consumption of goods already exceeding pre-pandemic levels but services expenditure lagging, Mr. Dunkelberg said.

"Service sector indicators indicate slower gains because the rush to open up has been blunted by the Covid-19 resurgence. More small businesses opening up larger states will cause these numbers to improve," he said.

Of owners surveyed, 21% selected the quality of labor as their top business problem, followed by taxes and poor sales, with a 17% and 15%, respectively.

The NFIB Uncertainty Index increased two points to 90, the second-highest reading since March 2017. Among reasons for uncertainty are sales volumes, regulations, Covid-19 or elections, the report said.

Write to Xavier Fontdegloria at xavier.fontdegloria@wsj.com