Wall Street started out Thursday in a bad mood, but investors regained their confidence by the early afternoon. Major benchmarks were up as much as half a percent as market participants started to get more comfortable with the idea that interest rates could remain higher for longer as long as economic growth remains in place.

When the market rallies, it's tempting always to look at high-flying tech stocks for the cause. Yet even though some of those stocks did reasonably well, there were some less typical companies helping to lead the markets higher. Below, you'll learn more about how Clorox (CLX -0.69%) and Wayfair (W 2.08%) managed to post sizable gains on Thursday.

Clorox is cleaning up for shareholders

Shares of Clorox were up more than 10% in early afternoon trading on Thursday. The maker of bleach and other household products reported fiscal fourth-quarter financial results for the period ended June 30 that gave shareholders a positive outlook on what's coming in the next year.

Clorox's financials were solid. Revenue climbed 12% year over year to $2.0 billion, with a more favorable price mix of products offsetting lower sales volume and adverse currency impacts. Cost-savings initiatives helped to boost gross margin by nearly 6 percentage points to 42.7%, and adjusted earnings of $1.67 per share surged 80% higher from year-ago levels.

CEO Linda Rendle described the plan at Clorox, which involves taking advantage of the company's highly valuable brands while it aims to streamline operations. Digital transformation will play an important part of that strategy, and already, the combination of accelerating sales growth and margin expansion is making everyone involved with Clorox more optimistic about its future. The company is seeing strength across all of its segments, including health and wellness, household, and lifestyle products.

Indeed, Clorox sees fiscal 2024 looking healthy. Sales could remain flat to up just 2%, but another boost in margins and further cost containment measures should help adjusted earnings come in between $5.60 and $5.90 per share, up between 10% and 16%. That kind of growth is impressive for a mature consumer products company, and those following Clorox are happy to see it go beyond simply being a defensive stock for conservative investors.

Wayfair bucks the challenging consumer economy

Wayfair stock put in an even stronger performance, rising 23% in early afternoon trading. The online furniture company struggled in 2022, but its share price has nearly tripled so far this year, and its latest  financial results added more fuel to hopes for its ongoing recovery.

Wayfair's second-quarter financial results were mixed. Revenue eased lower by 3% year over year to $3.2 billion, largely due to a 21% drop in international sales. However, net losses narrowed substantially, and after accounting for some extraordinary items, adjusted earnings returned to positive territory, weighing in at $0.21 per share.

Other business metrics showed the tough conditions that Wayfair is facing. Active customer counts dropped almost 8% to 21.8 million, but revenue per active customer inched higher, as did number of orders delivered. Co-founder/CEO Niraj Shah pointed to positive adjusted pre-tax operating earnings and free cash flow as milestones on the way to longer-term success for Wayfair.

Investors should prepare themselves to see ongoing sluggish activity in the consumer discretionary segment because furniture is still a high-ticket item. Nevertheless, Wayfair seems to have a good long-term plan in place, and that should pay off when the economy inevitably starts to turn more solidly positive.