Foreign exchange had a favorable impact of $13.2 million or 1%. As a result, adjusted organic revenue growth on a constant-currency basis was 2.3%. Adjusted operating income for the third quarter of 2023 was $517.4 million, an increase of $31.3 million or 6.4% in the third quarter of 2022. Adjusted operating margins were 37.9% in the third quarter of 2023, as compared to 36.8% in the third quarter of 2022. The 110 basis point margin expansion reflects the positive impact of both revenue growth and disciplined expense management. While our cost structure has been impacted by general inflation, higher personnel costs, and increased professional fees compared to 2022, our core expenses only increased 30 basis points or $2.6 million, excluding acquisitions and on a constant currency basis.
Acquisitions added $2 million in expenses and foreign currency increased costs by $8.4 million. And note that our expenses calculated on a similar basis is down $28.6 million or 3.3% sequentially. Adjusted consolidated EBITDA attributable to SS&C, defined in Note 3 in the earnings release was $533.9 million, or 39.1% of adjusted revenue, an increase of $32.2 million, or 6.4%, from Q3 last year. The 39.1% EBITDA margin reflects both a sequential and year-over-year improvement of 230 basis points and 110 basis points, respectively. Net interest expense for the third quarter of 2023 was $117.3 million, an increase of $35.1 million from Q3 2022. The Q3 2023 net interest expense excludes $3.4 million of non-cash amortized financing costs and OID.
The average interest rate in the quarter for the amended credit facility, including the senior notes were 6.87% compared to 4.55% in the third quarter of 2022. Adjusted net income, as defined in Note 4 in the earnings release was $295.9 million and adjusted diluted EPS was $1.17. The effective tax rate used for adjusted net income was 26%. Share repurchases of 1.7 million, drove the diluted share count down to 253.9 million from 255 million in Q2. SS&C ended the third quarter with $447.6 million in cash and cash equivalents and $6.9 billion in gross debt. SS&C’s net debt as defined in our credit agreement, which excludes cash and cash equivalents of $106.1 million held at DomaniRx LLC, was $6.6 billion as of September 30. Our LTM consolidated EBITDA used for covenant compliance was $2,063.8 million as of September 2023.
Based on net debt of approximately $6.6 billion, our total leverage ratio was 3.18 times. Our secured leverage ratio was 2.21 times as of September 30. As we look forward to the fourth quarter and establishing our guidance, note that we will continue to focus on client service and assume that our retention rates will continue to be in the range of our most recent results. We will continue to manage our expenses with a cost-discipline approach by controlling and aligning variable expenses to ensure efficiency, increasing productivity, to improve our operating margins, to leverage our scale, and effectively investing in the business through marketing, sales, and R&D to take advantage of future growth opportunities. Specifically, we have assumed adjusted organic growth for Q4 in the range of 1.8% to 4.8%, resulting in adjusted organic growth for the year in the range of 2.1% to 2.9%.
FX rates will be at current levels. Interest rates to remain flat through the end of the year, compared to the ending rate in the third quarter. GAAP tax rate of approximately 26% on an adjusted basis, which is unchanged from prior guidance. Capital expenditures to remain at 3.9% to 4.1% of revenues, which is unchanged from prior guidance, and a more weighted emphasis to share repurchases similar to what we did in Q3. For the fourth quarter of 2023, we expect revenue to be in the range of $1,370 million to $1,410 million. Adjusted net income in the range of $305 million to $327 million. Interest expense, excluding amortization of deferred financing costs and original issue discount in the range of $116 million to $119 million, diluted shares in the range of 252 million to 254 million, and adjusted diluted EPS in the range of $1.