Thanks, Mark, and good afternoon, everyone. Let's begin with our consolidated results. All comparisons are on a year-over-year basis, unless otherwise noted. Q2 total revenue was $32 billion, up 11% or 12% on a constant currency basis. Q2 total expenses were $22.6 billion, up 10% compared to last year.
In terms of the specific line items, cost of revenue increased 15%, driven primarily by infrastructure related costs. R&D increased 8%, driven mainly by headcount-related costs from our Reality Labs and Family of Apps segments, as well as restructuring costs. Marketing and sales decreased 12%, due mostly to lower marketing spend and payroll-related costs. And G&A increased 39%, due primarily to an increase in legal accruals, which was partially offset by lower payroll-related costs.
We ended the second quarter with over 71,400 employees, down 7% from the first quarter. Our second quarter headcount still included roughly half of the approximately 10,000 employees impacted by the 2023 layoffs. We expect that our third quarter headcount will no longer include the vast majority of impacted employees. Second quarter operating income was $9.4 billion, representing a 29% operating margin. Our tax rate for the quarter was 16%.
This is lower than our previous full-year outlook as our higher share price provided a higher tax deduction and lowered our taxes. Net income was $7.8 billion or $2.98 per share. Capital expenditures, including principal payments on finance leases were $6.4 billion, driven by investments in data centers, servers and network infrastructure. Free-cash flow was $11 billion, significantly benefiting from a deferral of income taxes that we expect will be paid in the fourth quarter. We repurchased $793 million of our Class-A common stock in the second-quarter and ended the quarter with $53.4 billion in cash and marketable securities.
Moving now to our segment results. I'll begin with our Family of Apps segment. Our community across the Family of Apps continues to grow.
We estimate that approximately 3.07 billion people used at least one of our Family of Apps on a daily basis in June and that approximately 3.88 billion people used at least one on a monthly basis. Facebook continues to grow globally and engagement remains strong. For the first time, we crossed 3 billion monthly active users with Facebook MAU ending at 3.03 billion in June, up 3% or 96 million compared to last year. Facebook's daily active users were 2.06 billion, up 5% or 96 million. DAUs represented approximately 68% of MAUs.
Q2 total Family of Apps revenue was $31.7 billion, up 12% year-over-year. Q2 Family of Apps ad revenue was $31.5 billion, up 12% or 13% on a constant currency basis. Within ad revenue, the online commerce vertical was the largest contributor to year-over-year growth, followed by entertainment and media and CPG. Online commerce benefited from strong span among advertisers in China, reaching customers in other markets. On a user geography basis, ad revenue growth was strongest in Rest of World at 16%, followed by Europe, North-America and Asia-Pacific at 14%, 11% and 10%, respectively. Foreign currency was a headwind to advertising revenue growth in all international regions. In Q2, the total number of ad impressions served across our services increased 34% and the average price per ad decreased 16%. Impression growth was primarily driven by Asia-Pacific and Rest of World. The year-over-year decline in pricing was driven by strong impression growth, especially from lower monetizing surfaces and regions. While overall pricing remains under pressure from these factors, we believe our ongoing improvements to ad targeting and measurement are continuing to drive improved results for advertisers.
Family of Apps other revenue was $225 million in Q2, up 3% as strong business messaging revenue growth from our WhatsApp business platform was partially offset by a decline in other line items. We continue to direct the majority of our investments toward the development and operation of our Family of Apps. In Q2, Family of Apps expenses were $18.6 billion, representing approximately 82% of our overall expenses. FoA expenses were up 8% due primarily to legal-related expenses and restructuring charges, partially offset by a decrease in non-headcount related operating expenses, including marketing. Family of Apps operating income was $13.1 billion, representing a 41% operating margin.
Within our Reality Labs segment, Q2 revenue was $276 million, down 39% due to lower Quest 2 sales. Reality Labs expenses were $4 billion, up 23% due to lapping a reduction in Reality Labs loss reserves in Q2 of last year, as well as growth in employee-related costs. Reality Labs operating loss was $3.7 billion. Turning now to the business outlook.
There are two primary factors that drive our revenue performance; our ability to deliver engaging experiences for our community; and our effectiveness at monetizing that engagement over time. On the first, overall engagement within Facebook and Instagram remained strong. Reels continues to grow and drive incremental engagement. On Facebook feed, in particular, recommended content from accounts you don't follow has increased significantly over the past year, while also becoming more incremental to engagement, demonstrating that people are getting added-value from discovering content from unconnected accounts. Looking-forward, we are optimistic about our ability to increase that value even further by leveraging advanced AI techniques to improve recommendations. In addition to improving the value people get within our Family of Apps today, we're also investing in entirely new experiences for the future. We're standing up infrastructure to support new AI-powered products across our services, which will give people more tools to express themselves and connect. And we've been pleased with the initial reception of our new standalone app Threads since its launch earlier this month. Our focus now is on further developing this into a product that will be valuable for a large set of people over-time.
Moving to the other driver of revenue, improving monetization. Here, we're focused on improving monetization efficiency of products that monetize at lower rates today like Reels and our messaging services and more broadly, driving measurable performance and returns for our advertisers. On Reels, we are making good progress on monetization with more than three quarters of our advertisers now using Reels ads. We remain focused on further reducing the Reels revenue headwind and narrowing the monetization efficiency gap with our more mature surfaces. However, we continue to expect time on Reels will monetize at a lower rate than Stories and Feed for the foreseeable future since people scroll more slowly through video content.
Within messaging, billions of people and millions of businesses use our messaging services every day to connect. We see a significant opportunity to build tools and functionality for businesses to help facilitate those interactions and are seeing early but promising progress with WhatsApp's paid messaging solution today.
In terms of our work to drive measurable performance for advertisers, it's concentrated in two primary areas, AI and onsite conversions. We're leveraging AI to move our systems towards using fewer larger models that enable us to leverage learnings across product surfaces and deploy improvements more quickly, broadly and efficiently. We're also leveraging AI to power advanced ads products like Advantage+ shopping, which continues to gain adoption. We're seeing this work translate into results for advertisers as conversion growth remained strong in Q2. In terms of driving on-site conversions, we continue to see strong results with click-to-messaging ads and are well positioned given our suite of messaging applications. Daily click-to-WhatsApp ads revenue continues to grow very quickly at over 80% year-over-year. We also recently started testing the ability to buy click-to-WhatsApp ads directly from the WhatsApp Business app, which now has more than 200 million monthly users. Looking ahead, we're focused on enabling businesses to optimize for conversions further down the funnel in our messaging applications. We're also investing in scaling other onsite objectives like lead generation and shops ads. Before turning to our revenue outlook, I'd also like to talk about our investment philosophy. We expect to bring the discipline and habits that we built during this year of efficiency with us as we plan for the future. At the same time, we remain focused on investing in the significant opportunities ahead. Part of supporting these initiatives will come from prioritizing them against other areas of work and shifting resources. However, in some cases, they will require incremental investment. This is particularly true in the areas we see the most significant opportunity, which include AI and the Metaverse. As I mentioned last quarter, we also remain focused on modestly evolving our capital structure over time.
We were pleased to execute our second bond offering in May and expect a measured pace of future debt raises as we work toward improving our overall cost-of-capital, while maintaining a positive or neutral net cash balance. In addition, we continue to monitor the active regulatory landscape. With respect to EU-US data transfers, we saw a positive development with the European Commission's adoption of a final adequacy decision, which allows us to continue to provide our services in Europe. This is good news. Though broadly speaking, we continue to see increasing legal and regulatory headwinds in the EU and the US that could significantly impact our business and our financial results. Turning now to the revenue outlook.
We expect third quarter 2023 total revenue to be in the range of $32 billion to $34.5 billion. Our guidance assumes a foreign currency tailwind of approximately 3% to year-over-year total revenue growth in the third quarter based on current exchange rates. Turning now to the expense outlook. We anticipate that our full-year 2023 total expenses will be in the range of $88 billion to $91 billion, increased from our prior range of $86 billion to $90 billion due to legal-related expenses recorded in Q2. This outlook includes approximately $4 billion of restructuring costs related to facilities consolidation charges and severance and other personnel costs.
We expect Reality Labs operating losses to increase year-over-year in 2023. While we are not providing a quantitative outlook beyond 2023 at this point, we expect a few factors to be drivers of total expense growth in 2024 as we continue to invest in our most compelling opportunities, including AI and the Metaverse. First, we expect higher infrastructure-related costs next year. Given our increased capital investments in recent years, we expect depreciation expenses in 2024 to increase by a larger amount than in 2023. We also expect to incur higher operating costs from running a larger infrastructure footprint. Second, we anticipate growth in payroll expenses as we evolve our workforce composition toward higher cost technical roles. Finally, for Reality Labs, we expect operating losses to increase meaningfully year-over-year due to our ongoing product development efforts in AR, VR, and our investments to further scale our ecosystem.
Turning now to the CapEx outlook. We expect capital expenditures to be in the range of $27 billion to $30 billion, lowered from our prior estimate of $30 billion to $33 billion. The reduced forecast is due to both cost-savings, particularly on non-AI servers, as well as shifts in CapEx into 2024 from delays in projects and equipment deliveries, rather than a reduction in overall investment plans. Looking ahead, while we continue to refine our plans as we progressed throughout the year, we currently expect total capital expenditures to grow in 2024, driven by our investments across both datacenters and servers, particularly in support of our AI work. On to tax, absent any changes to US tax law, we expect the tax rate for the rest of the year to be similar to Q2 2023.
In closing, Q2 was a good quarter for our business. We're executing well across our core priorities and are continuing to make progress on delivering exciting new experiences for our community. With that, Dave, let's open up the call for questions.