As mentioned, we were very pleased with our first quarter results. I will now review Q1 results in detail. Revenue was $131.2 million, up 87% year-over-year. The quarter's strength was broad-based, driven by new and existing customers, success across segments and sales channels, as well as driven by continued platform adoption.
To provide some more context.
First, in Q1, we saw strong new logo additions with contributions across sales channels and regions.
Additionally, we saw strong continued expansion of existing customers. In the first quarter, our dollar-based net retention rate was above 130% for the 11th consecutive quarter.
Our robust retention rate is driven primarily by increased usage of existing products, as well as cross-selling to newer products.
As Olivier mentioned, we are pleased with the initial uptake of our newest solutions NPM and RUM.
However, I would note that these newest products were immaterial to the results of the first quarter.
Lastly, we saw strength across segments, with similar growth rates across enterprise, mid-market and SMB. We were encouraged to see this broad-based strength, including many large enterprise deals which closed in March, as well as strength from our SMB customer base. In the quarter, we saw continued robust dollar rates -- net and gross retention in each of these segments.
Now turning to billings, which was $137.9 million and up 55% year-over-year. There are two dynamics here I'd like to call out.
First, while we saw billings duration come in a bit in some of our renewals and upsells in the quarter, as some of our clients move to quarterly or semiannual payment terms from prior annual terms, I want to note that this did not result in reduced duration of contract length, merely the payment terms.
This was due to customers' cash flow planning amid COVID and our accommodation to their billing preferences. The impact of shorter duration on the quarter was approximately $10 million to billings.
Given our very efficient land-and-expand model, however, we are still not dependent on large upfront payments for multi-year deals.
Next, there was a smaller impact from the invoice timing of a sizable existing customer, that was invoiced $4 million in Q1 last year and then due to growth was invoiced a second time in 2019, but was not invoiced in Q1 this year. Normalizing for these two impacts, calculated billings growth would have been approximately 70% year-over-year.
In addition, as of the end of Q1, our Remaining Performance Obligations or RPO was $256 million and grew 82% year-over-year. RPO measures commitments rather than billing terms. The higher growth of RPO indicates increases in longer-term commitments even when billing terms may be altered.
As discussed previously, we discourage the use of billings as a gauge of our momentum as it does not accurately portray the growth of our business. Revenue is a better indicator of growth given that our revenue is directly tied to consumption and due to the tight relationship between revenue and ARR.
Now let's review the income statement in more detail.
As a reminder, unless otherwise noted, all metrics are non-GAAP.
We have provided a reconciliation of GAAP to non-GAAP financials in our earnings release.
Gross profit in the quarter was $105.2 million representing a gross margin of 80%. This compares to a gross margin of 78% last quarter and 73% in the year ago period. Improvement in gross margin was driven by efficient use of our cloud hosting.
As we said before, our gross margins may fluctuate quarter-to-quarter within an acceptable range as we prioritize product development and innovation as well as the build-out of cloud data centers in newer geographies.
R&D expense was $35 million or 27% of revenue compared to 31% in the year ago quarter.
We have continued to invest significantly in R&D including high growth in our engineering headcount.
However, the growth of revenue has outpaced even our substantial investments.
We continue to see meaningful opportunity to innovate and expand our platform and therefore plan to continue making meaningful investments in R&D.
Sales and marketing expense was $42.1 million or 32% of revenues compared to 42% in the year ago period. Similar to R&D, we continue to make substantial investments in sales and marketing, but the pace of revenue growth has also outpaced this investment.
While we have experienced cancellation of marketing events due to COVID, we have successfully redeployed much of the events budget to advertising and other lead generation activities, but not quite on a one-for-one basis.
G&A expense was $12 million in the quarter or 9% of revenue slightly lower than 10% in the year ago period. Operating income was $16.1 million with a 12% operating margin compared to an operating loss of $7 million or a negative 10% margin in the year ago period.
Beyond the improvement in gross margin and the other factors discussed above, I'd also like -- I'd also note that reduction in T&E and facilities overhead related to COVID contributed slightly to the operating margin improvement.
Net income in the quarter was $18.8 million or $0.06 per share based on 328 million weighted average diluted shares.
We have a highly efficient business model and experienced a high return on our investments in sales and marketing and R&D.
While we have delivered three consecutive quarters of breakeven to positive operating income, we note that our priority remains top-line growth. And we intend to continue aggressive investments in R&D and go-to-market.
We have been very successful in interviewing hiring and onboarding remotely.
As a result, our plans for hiring and investing remain largely the same as before the corona outbreak.
We are investing across the board and believe we are well-positioned to execute on our plans of growth.
Turning to the balance sheet and cash flow. We ended the quarter with $799 million of cash, cash equivalents, restricted cash and marketable securities. Cash flow from operations was a positive $24.3 million in the quarter. After taking into consideration capital expenditures and capitalized software free cash flow was a positive $19.3 million in the quarter or a free cash flow margin of 15%.
I would now like to turn to our outlook for the second quarter and the full year 2020.
Given our recurring revenue model, we have not yet felt the effect of COVID-19 on our top line results. It is early in the quarter and we expect that we will see some deal slippage particularly in new logos.
We also expect that despite a relatively high net retention rate, we may see some downward pressure in net retention rate in the next two quarters.
As Olivier mentioned, the usage of some client surged in March and have adjusted somewhat in April, but remain above pre-COVID levels. It is too soon to know how usage will trend for the remainder of the quarter. Therefore, we believe it is prudent to expect some impact from the above effects most likely in Q2 and Q3 and potentially throughout the rest of the year given our ratable model. And as a result, we have incorporated this into our guidance.
Beginning with our second quarter guidance, we expect revenue to be in the range of $134 million to $136 million which represents a year-over-year growth of 62% at the midpoint. Non-GAAP operating income is expected to be in the range of a loss of $1 million to income of $1 million. Non-GAAP net income per share is expected to be breakeven to $0.01 positive per share based on approximately 329 million weighted average diluted shares.
Turning to the full year.
Given our first quarter strength and the drivers of our business, we feel comfortable raising our guidance for 2020 based on what we know today about COVID-19 and the macroeconomic environment.
For the full year 2020, revenue is expected to be in the range of $525 million to $565 million, sorry, $555 million to $565 million, which represents a 54% year-over-year growth at the midpoint. Non-GAAP operating income is expected to be in the range of breakeven to $10 million positive. Non-GAAP net income per share is expected to be in the range of $0.02 positive to $0.06 positive per share based on 330 million weighted average shares outstanding.
A few things to take into account in our guidance, while we do not guide to billings and continue to discourage this as a key metric when putting together your models, we would note that the shorter billing duration impact we talked about in Q1 is likely to continue for the next couple of quarters as customers plan for cash flow amid COVID-19, related to cost drivers, while we've seen continued improvement in our gross margins, we are running towards the top of our long-term target.
As we prioritize product development and diversifying our cloud hosting vendors and regions, our gross margins may fluctuate within a range of acceptability.
Next, our intention is to invest meaningfully and continue to do so in R&D and sales and marketing.
As noted, we have been successful in hiring and on-boarding during COVID. In Q2, we expect an approximately $5.5 million non-cash tax adjustment related to the expiration of a payroll tax liability. Similar to Q2 2019 this will be a benefit to GAAP operating income, but we intend to normalize for it in our non-GAAP results. And, therefore, it is neutral to non-GAAP operating income. Then some notes below operating income.
We expect approximately $2 million of interest income per quarter throughout 2020 based on our cash and investments.
Next, we do not expect to be a federal taxpayer but have a tax provision related to our international entity.
For the full year, we expect a tax provision of a range of $700,000 to $1.5 million. Note that our share forecast for Q2 and the full year are diluted, given that we expect to be a non-GAAP net income profitable company for both periods.
Lastly, while we're not giving guidance to cash flow a few things to note. Related to our employee stock purchase program, we've realized an inflow of about $3 million in cash flow from operations in both Q4 and Q1.
As the first program concludes, there is a change in geography, whereby, cash flow from operations will decline by $6 million and cash flow from financing activities will increase by $6 million, resulting in no net cash effect.
In addition, our new ESPP will produce $2 million to $3 million of new positive cash flow from operations in Q2.
Lastly, we expect pressure on billings duration and potentially on DSOs related to COVID, which may cause lower cash generation in the near-term.
Given our efficient model, proven cash flow generation, and meaningful cash on the balance sheet this will have no impact on our liquidity.
To summarize we were very pleased with the business performance in the first quarter.
We continue to deliver growth at scale a few can match and have demonstrated efficiency in our model.
While we recognize the challenges that COVID-19 and the macro environment may present, we continue to believe that we are well-positioned for the long-term and plan for continued investments to capitalize on the large opportunity ahead of us.
With that, we will now open the call for questions. Operator let's begin the Q&A.