Tech stocks are among the most popular in the stock market because of their growth potential. As it stands, tech companies account for seven of the 10 largest public companies in the world by market cap. Undoubtedly, tech stocks can surge a lot in short periods, but investors shouldn't invest with that as the expectation; the focus should be on the long-term potential.

If you have $3,000 available to invest, here are three tech companies to buy and hold for the long haul. Investing $3,000 between the three should give you exposure to high growth potential, reliable dividends, and a good combination of the two.

1. Microsoft 

There aren't many companies in the world that are as well positioned as Microsoft (MSFT 1.82%) for sustained growth over time. Despite the company being around since 1975, Microsoft's growth opportunities remain high as it enters into different high-growth segments like cloud computing services.

In its fiscal year 2023 (ended June 30), Microsoft made $211.9 billion in revenue, up 7% year over year. That's more than Salesforce and McDonald's total market cap. In its Q4, Microsoft's revenue was up 8%, but I'm more impressed by the growth in its net income, which increased 20% year over year.

Microsoft's increasing profitability and margins can be attributed to its growing software offerings. Physical products like PCs and phones require additional costs with each additional unit sold, but software can bring in recurring revenue via subscriptions with minimal added costs per consumer. Microsoft's gross margin increased 11% in Q4, led by Microsoft Cloud's 72% growth.

Many tech companies have various revenue streams, but few are as diverse as Microsoft's. The company is intertwined in the fabric of the corporate world in a way that all but ensures its longevity. It's trading at a premium valuation, but that shouldn't deter long-term investors.

2. AT&T

Find me someone who's been an AT&T (T 1.02%) investor over the past five years or so, and I'll show you someone more than likely disappointed with the results. In the past five years, AT&T's stock is down over 40%, and it's down close to 20% just this year.

Luckily, the main selling point for AT&T investors is the company's dividend, which is among the highest in the S&P 500. Its trailing-12-month dividend yield is just under 7.3%, and its quarterly payout is currently $0.28 per share.

Dividend yield fluctuates with stock price, so there's no guarantee it'll remain that high. But I would invest $1,000 in AT&T expecting to receive at least $70 annually in dividends at minimum.

It's been rough for AT&T, as the company has struggled with mishaps (like its media and entertainment ambitions) and large debt, but its current valuation gives it way more upside than downside. The company is still a cash cow, and there's something to be said about that. With a price-to-free cash flow multiple of just over 6.1, it seems like a bargain.

T Price to Free Cash Flow Chart

T Price to Free Cash Flow data by YCharts

Telecom has become a necessity in American life, and AT&T is the market leader. That in itself isn't enough to warrant an investment, but the company's lucrative dividend and respectable cash flow should give investors confidence AT&T is positioned to finally right the ship. All it takes is a little patience.

3. Taiwan Semiconductor Manufacturing

Taiwan Semiconductor Manufacturing (TSM 1.26%), also known as TSCM, is the global leader in semiconductor (chip) manufacturing, with a 55% market share as of the end of 2022.

Consumers may not interact with TSMC's products directly, but there's a good chance they own electronics that use its chips. They're in smartphones, car infotainment systems, data centers, and countless other electronics.

The global chip market is expected to get a boost from AI-related activities, and TSMC should be one of the main beneficiaries of it. The global AI chip market was valued at just under $15 billion in 2022 and is expected to reach over $383 billion by 2032, representing a compound annual growth rate of over 38%.

Companies like Nvidia will rely heavily on TSMC to produce chips for their GPUs, which help power many of the data centers vital for AI. TSMC is on track to ship about $22 billion of one product, the H100 Hopper GPU, alone this year.

TSMC presents a two-for-one case for investors: high growth opportunity as well as an above-average dividend. Its trailing-12-month dividend yield is 2%, which isn't necessarily eye-popping, but still more than the S&P 500 average.