While 2022 was a rough year for tech stocks, AT&T (T 0.83%) saw soaring customer acquisition numbers, which translated into revenue growth. Yet the telecom giant exited last year with a net loss of $7.1 billion.

This contradiction can make it challenging for investors to know if now is a good time to invest in AT&T. After all, the company found success despite a challenging macroeconomic environment of high inflation and rising interest rates.

Let's dive into AT&T's 2022 results to understand where the storied telecom is at today. This info can help you evaluate if now is the right time to invest.

AT&T's 2022 performance

AT&T enjoyed an excellent 2022, exiting with $120.7 billion in revenue, up from $118.2 billion in 2021 after adjusting for divested businesses. The company's mobile operations fared even better, generating $81.8 billion in 2022 compared to $78.3 billion in 2021. In fact, 2022 represented the most profitable year in the history of AT&T's mobile business, and profit growth is expected to continue this year.

AT&T's mobile success was driven by strong customer growth. The company's net additions among postpaid phone customers, the telecom industry's most valuable customer segment, totaled nearly 3 million in 2022 -- and almost 7 million since John Stankey became CEO in 2020, representing the best period of customer growth in over a decade.

AT&T is also increasing customer adoption of its fiber optic internet product. Last year marked the fifth consecutive year of 1 million or more net additions to its fiber customer base.

Fiber eclipsed non-fiber broadband connections for the first time in the second half of 2022, a positive sign of fiber's continued momentum. This is an important milestone since both 5G and fiber expansion are key to AT&T's strategy for future revenue growth.

Factors in AT&T's net loss

With all its success in 2022, how did AT&T end the year with a net loss? Its old landline business was the culprit. The company's landline revenue is slowly withering away. AT&T's business and consumer wireline divisions saw 2022 revenue sink to $35.3 billion from $36.5 billion in 2021.

Due to these declining assets, AT&T booked an accounting write-off of about $25 billion in Q4, called a goodwill impairment charge. While the amount is substantial, it's an understandable write-down since landlines are fading in favor of the secular trend of 5G wireless technology.

On top of this write-off, AT&T had allocated $24 billion in capital expenditures for 2022 to expand its fast-growing 5G and fiber optic networks. These two factors combined to push AT&T into unprofitable territory last year.

Although costly, the capital investments are paying off. AT&T anticipates wireless service and broadband revenues to continue growing in 2023 by at least 4% over last year despite a tough macroeconomic environment.

Moreover, industry forecasts estimate consumers will aggressively adopt 5G as network coverage improves and 5G-compatible devices become cheaper. Consequently, U.S. 5G subscriptions are expected to balloon from 14.4 million in 2020 to over 400 million by 2027. This trend bodes well for the continued growth of AT&T's wireless business.

Whether or not to buy AT&T stock

Along with revenue growth, AT&T has worked to reduce debt, cutting net debt by about $24 billion last year, and protect its free cash flow (FCF). Since FCF is essential to funding AT&T's high-yield dividend, the company's FCF results are important for investors.

At the end of Q3, AT&T needed to generate $6 billion in Q4 FCF to reach its target of $14 billion for the year. The telecom achieved its goal, hitting $6.1 billion in Q4. For 2023, AT&T expects higher FCF with a target of at least $16 billion.

This year's FCF forecast provides confidence that AT&T's dividend is secure. Investors can reap the benefits of the dividend, currently yielding 5.8%, while the company's revenue mix shifts increasingly to 5G wireless and fiber optic broadband products as the contribution from landlines shrinks over time.

So an investment in AT&T would be for the long term. The company has proven to be in good hands under Stankey's leadership. It's focused on high-growth areas while maintaining discipline around cost and debt reduction. These are all positive signs that AT&T is on the right track to sustained success in the highly competitive U.S. telecom market. Given the number of positives around AT&T's business and a secure dividend, AT&T is a worthwhile long-term investment.