Xylem Inc. XYL has reported better-than-expected results for second-quarter 2021. Its earnings surpassed the Zacks Consensus Estimate by 4.8%. This is the fifth consecutive quarter of an earnings beat for the company. Also, quarterly sales surpassed estimates by 2.9%.Adjusted earnings in the quarter under review were 66 cents per share, surpassing the Zacks Consensus Estimate of 63 cents. Also, the bottom line increased 65% from the year-ago figure of 40 cents on the back of higher sales generation and margin improvement.It is worth noting that movements in foreign currencies had a positive impact of 5 cents per share on earnings.Revenue DetailsIn the quarter under review, Xylem’s revenues were $1,351 million, reflecting an increase of 16.5% from the year-ago quarter. Organic sales in the quarter increased 11% on the back of healthy demand in its three segments.The company’s revenues surpassed the Zacks Consensus Estimate of $1,313 million.Orders in the reported quarter increased 35% year over year to $1,660 million. Organically, orders grew 29%.The company reports net sales under three segments, which are Water Infrastructure, Applied Water, and Measurement & Control Solutions. The segmental information is briefly discussed below:Revenues for the Water Infrastructure segment were $569 million, up 13.6% year over year. Organic sales in the reported quarter grew 6% year over year. Businesses in both industrial and utilities end markets improved in the quarter.The Applied Water segment generated revenues of $414 million in the second quarter, up 22.8% year over year. Organic sales increased 18% on a year-over-year basis. Businesses in commercial, industrial and residential markets were healthy.Quarterly revenues of the Measurement & Control Solutions segment were $368 million, up 14.3% year over year. Organic sales were up 11% year over year. Benefits from high demand for water quality testing applications and high volumes aided results.Margin ProfileIn second-quarter 2021, Xylem’s cost of sales increased 14.5% year over year to $831 million. As a percentage of revenues, it represented 61.5% versus 62.6% in the year-ago quarter. Selling, general and administrative expenses increased 5.6% to $304 million. Meanwhile, research and development expenses grew 20.5% to $53 million.In the reported quarter, the company’s adjusted earnings before interest, tax, depreciation and amortization were $234 million, increasing 32.2% from the year-ago quarter. Margin in the quarter grew 200 basis points (bps) year over year to 17.3%. Productivity gains, volume leverage and favorable mix aided the results.Adjusted operating income was $166 million in the quarter under review, up 53.7% year over year. Operating margin grew 300 bps to 12.3%. Interest expenses in the reported quarter totaled $21 million, up from $18 million in the year-ago quarter.Balance Sheet and Cash FlowExiting the second quarter of 2021, Xylem had cash and cash equivalents of $1,840 million, increasing 9% from $1,688 million at the end of the last reported quarter. Long-term debt balance grew 0.2% sequentially to $2,460 million.In the reported quarter, the company generated net cash of $232 million from its operating activities, reflecting an increase of 28.2% from the year-ago quarter. Capital expenditure was $41 million, down 6.8% from the year-ago figure of $44 million. Free cash flow was $191 million, up 39.4% year over year.Shareholder-Friendly PoliciesIn the first half of 2021, the company paid out dividends of $102 million, reflecting an increase from $95 million distributed in the year-ago period. Share repurchased amounted to $68 million, up 13.3% year over year.OutlookFor 2021, Xylem increased its organic revenue growth projection to 6-8% from the previously stated 5-7%. Total revenues are predicted to increase 9-11% as compared with 8-10% mentioned previously.Adjusted earnings per share in the year are anticipated to be $2.55-$2.70, as compared with $2.50-$2.70 mentioned previously. The guidance mirrors an improvement in demand, pricing actions and commercial activities, partially offset by supply-chain woes and inflation headwinds.Xylem Inc. Price, Consensus and EPS Surprise Xylem Inc. price-consensus-eps-surprise-chart | Xylem Inc. QuoteZacks Rank & Stocks to ConsiderThe company currently has a market capitalization of $22.6 billion and a Zacks Rank #3 (Hold).Some better-ranked stocks in the industry are The Middleby Corporation MIDD, Altra Industrial Motion Corp. AIMC and Dover Corporation DOV. While Middleby currently sports a Zacks Rank #1 (Strong Buy), both Altra Industrial and Dover carry a Zacks Rank #2 (Buy). You can see the complete list of today’s Zacks #1 Rank stocks here.In the past 30 days, earnings estimates for these companies improved for the current year. Further, earnings surprise for the last reported quarter was 9.82% for Middleby, 8.54% for Altra Industrial and 11.96% for Dover. Zacks' Top Picks to Cash in on Artificial Intelligence In 2021, this world-changing technology is projected to generate $327.5 billion in revenue. Now Shark Tank star and billionaire investor Mark Cuban says AI will create "the world's first trillionaires." Zacks' urgent special report reveals 3 AI picks investors need to know about today.See 3 Artificial Intelligence Stocks With Extreme Upside Potential>>Want the latest recommendations from Zacks Investment Research? Today, you can download 7 Best Stocks for the Next 30 Days. Click to get this free report Dover Corporation (DOV): Free Stock Analysis Report The Middleby Corporation (MIDD): Free Stock Analysis Report Altra Industrial Motion Corp. (AIMC): Free Stock Analysis Report Xylem Inc. (XYL): Free Stock Analysis Report To read this article on Zacks.com click here. Zacks Investment Research