The spread of cloud computing and data analytics is lifting the number of tech jobs and boosting the U.S. economy, according to trade group CompTIA.

A total of 11.8 million people held tech jobs in 2018, up 2.3% from the previous year, with gains led by software developers, systems analysts and cybersecurity analysts, and IT support specialists, CompTIA said in a report Tuesday. Tech jobs accounted for 7.6% of the U.S. workforce last year, up from 7.2% in 2017.

If the pace holds, the number of U.S. tech professionals is set to grow 13.1% over the decade between 2016 and 2026, creating 8.6 million new jobs, the report said. Over that period, the number of jobs for all occupations is projected to grow 10.7%.

Tech workers are about evenly split, according to the report: 46% work for technology companies, a category that includes Silicon Valley firms, while 54% work in IT in other industries.

“We take it for granted that technology has an impact,” said Tim Herbert, CompTIA’s senior vice president of research. As an economic driver, he said, tech is shifting beyond Silicon Valley to businesses across the country.

Companies of all sizes are being transformed by technology in places like in Charlotte, N.C., or Boise, Idaho, he added: “When you really drill down into what’s happening in states that you don’t always think of as having a strong tech presence, it’s really something.”

Newsletter Sign-up CIO Journal The Morning Download delivers daily insights and news on business technology from the CIO Journal team. PREVIEW

As of the end of 2018, more than 100,000 workers in Charlotte had jobs in tech, either working for one of the city’s 4,228 tech firms or as IT professionals at local businesses, accounting for 8.1% of the city’s workforce, the report said.

Boise’s net tech employment hit 28,645 last year, up 4.1% from 2017, representing 8.4% of its workforce, the report said. In 2018, the city had just over 1,000 tech firms.

The results are based on an analysis of Labor Department data, as well as other government sources.

The tech sector generated an estimated $1.8 trillion last year, up from $1.6 trillion in 2017. Tech’s share of gross domestic product rose to 10.2% in 2018 from 9.2% in 2017, the report said.

That makes tech the third biggest contributor to the economy, behind manufacturing and government services but ahead of the finance and insurance sectors, CompTIA said.

Part of the reason for tech’s employment growth beyond Silicon Valley is that the role of IT is shifting from backroom tech support to business strategies and revenue generation, said Craig Stephenson, senior partner and managing director of the North American technology officers practice at executive-search firm Korn/Ferry International.

“Companies are experiencing new challenges which may require a modernization of functional capabilities,” Mr. Stephenson said, adding that technology is quickly becoming critical for revenue growth, the time it takes a product to reach the market, and customer experience.

Korn/Ferry last year found that 83% of nearly 200 IT executives surveyed at firms across a range of industries described their role as being more strategic than it was three years ago.

That, in turn, is prompting companies to raise IT budgets. Gartner Inc. expects global spending on IT to reach $3.8 trillion this year, up 3.2% from 2018, driven by the shift to cloud services, among other factors. Increased IT spending is driving job growth across the tech sector, said John-David Lovelock, a research vice president at Gartner.

“IT is no longer just a platform that enables organizations to run their business on. It has become the engine that grows the business,” Mr. Lovelock said.

A downside of higher demand for tech workers is a yawning talent gap, CompTIA’s Mr. Herbert said.

More than 80% of roughly 2,800 tech-hiring decision makers at U.S. firms, surveyed by Robert Half International Inc. this year, said finding tech talent was a challenge, especially business intelligence analysts, cloud architects, cloud systems engineers and data scientists.

CompTIA recorded more than 3.7 million tech-occupation job postings last year, the report said.

Write to Angus Loten at angus.loten@wsj.com