What was the revenue growth rate for Keysight in Q2 2021 compared to the same period in the previous year 
 by the ongoing investments in 5G and 400 gig, 800 gig Ethernet solutions for data centers. As 5G progresses and deployments drive sustained investment, we are uniquely positioned to capture the opportunities ahead as the ecosystem scales. Recent engagements include a broadening set of new customers, as well as key industry players such as NEC, Fujitsu, and MediaTek.
We continue to maximize the 5G life cycle opportunity and lead the industry with differentiated 5G solutions. In addition, the success of our application layer strategy is reflected in the strong demand for new technologies such as O-RAN and business expansion in new end-to-end verticals. Our ability to provide complete solutions for network protocol test, security, and visibility is enabling us to solve many challenges across the industry. In another area of disruption, we continue to advance our long-term initiative to enable the quantum revolution.
We are growing our quantum engagements with key customers worldwide. We also expanded our quantum solutions portfolio this quarter with the acquisition of Quantum Benchmark, which brings deep expertise in the performance validation software for quantum computing. Keysight's software-centric solutions in higher-value services continue to drive differentiation and recurring revenue growth. For the second quarter in a row, software and services each delivered double-digit order and revenue growth.
Beyond innovation, execution, and financial discipline, Keysight's culture has long embraced corporate social responsibility. We believe our focus on climate and diversity provides us with a competitive advantage. We recently published our annual CSR report, which includes progress toward our prior goals and the announcement of our commitment to achieving net-zero emissions in the company operations by 2040. We are working to set interim science-based targets to ensure our progress toward this goal.
Diversity and inclusion are also embodied in our Keysight leadership model. As a CEO priority, we have specific goals and actions that will be tracked by our leadership team and the Board of Directors. Diversity and inclusion brief will be published this month that describes our long-standing D&I philosophy, as well as the details of our strategies and goals. While there is more work to do, Keysight remains steadfast in our commitment to CSR and building a better planet.
As we look ahead, we are encouraged by the strong demand for our differentiated solutions while managing the longer lead times and component availability constraints. Our in-house high-performance semiconductor fab and the strength of our order fulfillment team are helping us manage these near-term supply challenges and give us confidence in our ability to navigate them entering the second half of this year. In summary, Keysight is enabling disruptive innovation across multiple waves of technology with a decades-long runway ahead of us. Our execution in the face of many dynamic challenges this past year is a testament to the Keysight leadership model, our employees, and the breadth and depth of our customers.
Now I would like to turn it over to Neil to discuss our financial performance and outlook in more detail.
Neil Dougherty -- Chief Financial Officer
Thank you, Ron, and hello, everyone. As Ron mentioned, the Keysight team delivered another outstanding quarter and better-than-expected results as robust demand for our differentiated solutions and continued macro recovery resulted in strong growth across all regions. Second-quarter revenue of $1.22 billion was above the high end of our guidance range and grew 36% or 33% on a core basis versus a soft compare due to COVID-related disruption. Q2 revenue growth was driven by broad strength across all markets and geographies as the Keysight team navigated macro-dynamics and supply chain constraints.
We achieved second-quarter orders of $1.332 billion, up 22% or 19% on a core basis. Turning to our operational results for Q2. We reported gross margin of 64%, which increased 170 basis points. Operating expenses of $
 by the ongoing investments in 5G and 400 gig, 800 gig Ethernet solutions for data centers. As 5G progresses and deployments drive sustained investment, we are uniquely positioned to capture the opportunities ahead as the ecosystem scales. Recent engagements include a broadening set of new customers, as well as key industry players such as NEC, Fujitsu, and MediaTek.
We continue to maximize the 5G life cycle opportunity and lead the industry with differentiated 5G solutions. In addition, the success of our application layer strategy is reflected in the strong demand for new technologies such as O-RAN and business expansion in new end-to-end verticals. Our ability to provide complete solutions for network protocol test, security, and visibility is enabling us to solve many challenges across the industry. In another area of disruption, we continue to advance our long-term initiative to enable the quantum revolution.
We are growing our quantum engagements with key customers worldwide. We also expanded our quantum solutions portfolio this quarter with the acquisition of Quantum Benchmark, which brings deep expertise in the performance validation software for quantum computing. Keysight's software-centric solutions in higher-value services continue to drive differentiation and recurring revenue growth. For the second quarter in a row, software and services each delivered double-digit order and revenue growth.
Beyond innovation, execution, and financial discipline, Keysight's culture has long embraced corporate social responsibility. We believe our focus on climate and diversity provides us with a competitive advantage. We recently published our annual CSR report, which includes progress toward our prior goals and the announcement of our commitment to achieving net-zero emissions in the company operations by 2040. We are working to set interim science-based targets to ensure our progress toward this goal.
Diversity and inclusion are also embodied in our Keysight leadership model. As a CEO priority, we have specific goals and actions that will be tracked by our leadership team and the Board of Directors. Diversity and inclusion brief will be published this month that describes our long-standing D&I philosophy, as well as the details of our strategies and goals. While there is more work to do, Keysight remains steadfast in our commitment to CSR and building a better planet.
 As we look ahead, we are encouraged by the strong demand for our differentiated solutions while managing the longer lead times and component availability constraints. Our in-house high-performance semiconductor fab and the strength of our order fulfillment team are helping us manage these near-term supply challenges and give us confidence in our ability to navigate them entering the second half of this year. In summary, Keysight is enabling disruptive innovation across multiple waves of technology with a decades-long runway ahead of us. Our execution in the face of many dynamic challenges this past year is a testament to the Keysight leadership model, our employees, and the breadth and depth of our customers.
Now I would like to turn it over to Neil to discuss our financial performance and outlook in more detail.
Neil Dougherty -- Chief Financial Officer
Thank you, Ron, and hello, everyone. As Ron mentioned, the Keysight team delivered another outstanding quarter and better-than-expected results as robust demand for our differentiated solutions and continued macro recovery resulted in strong growth across all regions. Second-quarter revenue of $1.22 billion was above the high end of our guidance range and grew 36% or 33% on a core basis versus a soft compare due to COVID-related disruption. Q2 revenue growth was driven by broad strength across all markets and geographies as the Keysight team navigated macro-dynamics and supply chain constraints.
We achieved second-quarter orders of $1.332 billion, up 22% or 19% on a core basis. Turning to our operational results for Q2. We reported gross margin of 64%, which increased 170 basis points. Operating expenses of $