John Curran - Senior Vice President and Chief Financial Officer
Thank you, and good evening, everyone. Im John Curran, Cognex's CFO, and I'd like to welcome you to our second quarter earnings conference call. With me on today's call are Dr. Bob Shillman, Cognex's Chairman and Rob Willett, Cognex's President and CEO. Please note that our earnings release and Form 10-Q are available on the Cognex Web site at
Cognex | Machine Vision and Barcode Readers Both documents contain detailed information about our financial results.
During the call, we may use a non-GAAP financial measure if we believe it is useful to investors, or if we believe it will help investors better understand our results or business trends. You can see a reconciliation of certain items from GAAP to non-GAAP in Exhibit 2 of the earnings release. Any forward-looking statements we made in the earnings release or any that we may make during this call are based upon information that we believe to be true as of today. Things can change, however, and actual results may differ materially from those projected or anticipated. You should refer to our SEC filings, including our most-recent Form 10-K for a detailed list of these risk factors.
With that, I will now turn the call over to Dr. Bob.
Dr. Bob Shillman - Chairman
Thanks, John and hello everyone and thank all of you for joining us today. Cognex reported rather good results for the second quarter of 2018. In fact, our revenue for this Q2 was the second highest of any quarter in our Company's 37-year history and operating margin was 30%, which is in line with our long-term target. The underlying business trends in the broad factory automation market continued to be strong. Excluding consumer electronics, revenue in Q2 grew at a rate that was well above our long-term target of 20%.
I'm now going to turn the call over to my partner, Rob Willett, who will provide more details. And I'll be available at the end of the call if any questions that you may have for me. Rob, the microphone is yours.
Rob Willett - President and Chief Executive Officer
Thank you, Dr. Bob and good evening everyone. Revenue in Q2 was $211 million, representing year-on-year growth of 19% and landing slightly over the top end of our guidance. We performed well across most end markets, led by logistics and automotive. Our investments in new product development and sales force expansion continued to deliver share gains for Cognex across most of our served markets.
Strengths in our broader factory automation market is obscured this year by lower spending on vision by major OLED display and smartphone manufacturers, following substantial investments last year. Despite this, a very positive view of Cognex’s long-term growth prospects remains unchanged. Positive drivers, including rising labor costs around the world, the need for increased productivity and improvements in product quality and of course, the manufacture of products too small to assemble by human hand, are all increasing investments in machine vision. We see the fastest growth rates among our smaller, newer markets, such as consumer products and food, which are increasingly adding Cognex vision and ID to improve product quality and increase productivity. We are able to satisfy these needs both by increasing the ease of use and integration of our products, as well as by adding sales noise to reach an ever broader set of machine vision customers.
Regarding new products, we’re pleased to report good progress in integrating technology from our recent acquisitions into Cognex’s standard products. Deep learning-based image analysis software from ViDi Systems is now accessible through our VisionPro platform. This enables sophisticated customers to more easily leverage deep learning technology together with our industry-leading vision tools. We are pleased to report that we have just received our first $1 million purchase order for our deep learning vision software, and we are working on its application at many other leading manufacturers. The barcode verification capabilities we acquired from Webscan are now available on our DataMan ID platform. We are seeing broad-based demand for code verifiers. Grading and verification is becoming increasingly important as manufacturers seek to implement a consistent quality of ID codes across their widely distributed supply chains.
In other news, we received our first large purchase order for mobile terminals of approximately $1 million from a Fortune 100 company. While we’re still at the beginning of our journey into the mobile terminal market, this year's addition of our long-range MX 1502 ER product has noticeably strengthened our position.
I'll now turn the call over to John for some financial details from the second quarter.
John Curran
Thank you, Rob. As noted last quarter, our Q2 earnings release and all discussions reflect the retroactive adoption of the new revenue standard that took effect on January 1st. As a reminder, the sale of certain accessories that we historically reported on a net basis are now reported on a gross basis. This does not change our gross margin dollars but our gross margin percentage has decreased from historical rates by 100 basis points to 200 basis points.
Now, for our Q2 highlights. As mentioned, Q2 revenue was $211 million, an increase of 19% year-on-year. Gross margin was 74% compared to 76% in the year ago period. This decrease was primarily due to an increase in revenue related to application-specific customer solutions. These solutions typically have lower gross margins due to the engineering effort required to develop the solution, as well as services associated with the installation and support. Operating expenses totaled $94 million for the second quarter, an increase of 23% year-on-year. It's worth noting that the rate of expense growth is slowing, but we expect to continue to invest in critical areas to support the long-term growth opportunities we see for our business. Incremental spending in Q2 came from new hires and increased activity in sales and engineering. In terms of headcount we now have nearly 2000 Cognoids worldwide, an increase of 26% over a year ago.
Operating margin in Q2 was 30%, an increase of 10 percentage points compared to Q1 of 2018, but a decrease of 4 percentage points when compared to Q2 of 2017. The year-over-year change is mainly a reflection of our record-breaking performance last year along with our continued investments in engineering and sales. Our tax rate excluding discrete items was 17% for the quarter compared to 15% in Q1 of 2018 and 18% in Q2 of 2017. We have increased our tax rate for 2018 to 16%, reflecting our expectation that more of the Company's profits will be earned and taxed in a higher tax jurisdiction than previously expected. Excluding discrete tax adjustments, we reported earnings of $0.31 per share for Q2 of 2018 compared to $0.28 in Q2 of last year.
Looking at revenue year-on-year from a geographic perspective, overall market conditions were strong. Greater China led the way in percentage growth as revenue grew more than 50% year-on-year. Demand was strong in automotive and in the broad electronics supply-chain. Revenue from the Americas grew by more than 20% over Q2 of '17. Similar to Q1, growth was particularly strong in the logistics market as well as other industry verticals, including automotive, food and consumer products.
Europe increased mid-single digit in constant currency, strengthened the broad factory automation market led by logistics, automotive and consumer products was partially offset by lower large order revenue from consumer electronics. Revenue from other Asia region decreased mid-single digits on a percentage basis from Q2 of 2017, reflecting lower spending by customers in OLED display manufacturing.
Our balance sheet remains in great shape, as we exited the quarter with $755 million in cash and investments and no debt. We have sufficient capital to support our organic growth objectives, M&A plan and to returning capital to our investors through stock buybacks and dividends. In Q2, we bought back 1.1 million shares. We plan to continue to buy back stock in Q3 subject to market conditions and other factors. As announced tonight, our Board of Directors declared a cash dividend of $0.045 per share payable on August 31st to all shareholders of record as of August 17st.
With that, I will now turn the call back to Rob.
Rob Willett
Thanks, John. Turning to guidance for the third quarter. We expect revenues between $220 million and $230 million, which at the midpoint represent growth of 7% from Q2. However, if we look year-on-year this range reflects a substantial decline from an exceptional quarter a year ago when large projects in OLED display and smartphone manufacturing drove revenue to a record level. Gross margin for Q3 is expected to continue to be in the mid 70% range. Quarterly operating expense growth is expected to continue to moderate year-on-year as we move through the second half of 2018. On a sequential basis, operating expenses are expected to be approximately flat with Q2. The effective tax rate is expected to be 16% excluding discrete tax items.
In summary, Q2 proved to be the quarter we expected and we remain confident about our longest term growth opportunity. As such, we will continue to make investments in Cognoids and technology to strengthen our leadership in the global machine vision market.
Cognex Corporation (CGNX) CEO Rob Willett on Q2 2018 Results - Earnings Call Transcript | Seeking Alpha