Sometimes, bad news is good news.

That seemed to be the market's reaction to Salesforce's (CRM 0.53%) layoffs announcement this morning, as investors bid the stock up 3% in afternoon trading.

The cloud software giant is cutting roughly 8,000 employees, or about 10% of its workforce, as part of a larger restructuring plan. In a brief letter sent to employees this morning and made public in an SEC filing, CEO Marc Benioff said, "As our revenue accelerated through the pandemic, we hired too many people leading into this economic downturn we're now facing, and I take responsibility for that."

Referencing the macro headwinds that a wide range of tech companies are facing, Benioff also said that customers are taking a more "measured approach to their purchasing decisions."

Digital images of clouds and data.

Image source: Getty Images.

Ripping off the Band-Aid

Salesforce's stock got walloped in 2022, falling nearly 50%, and the company had earlier promised cost cuts when it announced a plan at its Investor Day conference last September. It outlined a revenue target of $50 billion by fiscal 2026, up from an expected $31 billion in fiscal 2023, and adjusted operating margins of at least 25% by FY 2026, up from an expected 20.7% in FY 2023, which ends at the end of January.

As part of that goal, the company aims to reduce adjusted sales and marketing expenses to below 35% of revenue, so it's likely that sales and marketing staff are the targets of at least some of the layoffs, especially given Benioff's comments about slowing customer demand.

The company also said it was taking steps to reduce its real estate footprint, though it didn't provide many details on that.

It did say that the layoffs would result in $1.4 billion to $2.1 billion in charges for severance and other expenses, and of that total, $1 billion to $1.4 billion were associated with layoff-related expenses, while $450 million to $650 million will go to its real estate exits.

It expected $800 million to $1 billion of those to be incurred in the current quarter and said $1.2 billion to $1.7 billion will be in future cash expenditures. The company did not say how much it expected to save over the long term from the restructuring plan.

Is this a red flag?

Prior to the layoff announcement, Salesforce was already facing challenges on multiple fronts. In addition to the stock plunge last year, revenue growth slowed to just 14% in its most recent quarter, the slowest pace in its history as a public company, and management called for just 8% to 10% revenue growth in the fourth quarter.

Salesforce also lost two top executives in the span of just days last month. Co-CEO Bret Taylor said he was stepping down after six years with the company, and Slack CEO Stewart Butterfield, who ran the Slack messaging platform that Salesforce acquired for $27.7 billion in 2020, also announced his departure. Additionally, activist investor Starboard Value has also taken notice of the company's struggles, calling on it in October to improve its operating leverage.

The layoffs are also noteworthy because Salesforce has a reputation for being a profligate spender. The Slack acquisition, which came during the pandemic tech boom, now looks questionable with a price tag of nearly $28 billion, and Salesforce is the largest tenant in the recently built Salesforce Tower, San Francisco's tallest building, at a time when the office real estate market seems to be collapsing. The company has impressive adjusted operating margins, but on a GAAP basis, it's barely profitable due to share-based compensation that looks excessive even for a cloud software company.

Workforce reductions have also become common in the tech sector. Both Amazon and Meta Platforms have announced similarly sized layoffs, and a wide range of software companies are slashing their workforces after investing too aggressively during the pandemic.

The cuts in its workforce and real estate could represent a significant strategic shift for Salesforce. The company has long been a leader in cloud software, an industry it pioneered, and it regularly puts up strong growth, but it could use some discipline on the cost side.

Layoffs alone aren't a solution, but they could boost margins, as salaries and benefits tend to make up a large percentage of expenses at software companies.

It also shows management is serious about reaching the fiscal 2026 targets, including a 25% adjusted operating margin. With a slimmed-down workforce and a recession possibly around the corner, hitting the $50 billion revenue goal may be harder, but investors should keep an eye on those targets going forward.

If Salesforce can deliver on those goals, the stock is likely to be a winner over the next few years.