Thanks, Larry, and thank you, everyone, for joining the call. I will now walk you through our operating and financial results. Please note that all financial data I talk about will be presented in RMB terms.
We entered 2019 with robust growth in the first quarter, and I am pleased to report that with our continued momentum across all our key operating metrics, which drove the strong financial performance during the second quarter. We are still laser focused on online, live, large class, which we believe is the most effective and scalable model to disseminate the scarce, high-quality teaching resources in China to aspiring students all over the country.
Net revenues in the second quarter jumped 413% from the same period of 2018. Our gross billings, which is the metric we pay close attention to, increased by 462% year-over-year to CNY 599.4 million, up from CNY 106.6 million in the same period of 2018. Total enrollment, which refers to the enrollment are paying more -- paying more than RMB 9.9, reached a historical high, hitting the number of 592,000, 3.5x that of the same period of 2018. Period enrollments, which refers to enrollments for regular classes, increased to 363,000 from 94,000 in the second quarter. The across-the-board growth was primarily driven by the continued expansion of our K-12 after-school tutoring business, and to a lesser extent, our foreign language, professional and interest courses.
Now let's break down our revenue stream. Net revenue from our K-12 courses increased by 463.7% to CNY 270.3 million and accounted for 76.4% of net revenues, increasing from 69.6% in the same period of 2018. This revenue growth was primarily driven by increase in paid course enrollments and K-12 students tuition fees. Our standard tuition fees for our K-12 courses increased an average of over 20% year-over-year. Another reason for the increase in ASP is that we introduced the new courses that have higher standard tuition fees. For example, we launched a critical thinking course in late 2018 that has been well received by parents so far.
Gross billings contributed by K-12 after-school tutoring business were CNY 504 million compared with CNY 79 million in the second quarter in 2018. Paid course enrollments increased by 372% to 321,000, up from approximately 68,000 for the same period of 2018, demonstrating our superior education quality recognized by parents and students. The ramp-up in paid course enrollments is also a result of our high retention rate, evidenced by the reregister of 3-semester students in sequential semesters. Average gross billings for paid course enrollment increased from 1,100 in the second quarter of 2018 to 1,500 in the second quarter of 2019.
Net revenue from our foreign language professional and interest courses accounted for 21.8% of net revenue, increasing from 17.4% in the same period of 2018. Net revenue increased by 542.7% to CNY 77 million, up from CNY 12 million for the same period of 2018. The significant year-over-year increase was primarily because we are able to raise tuition fees by optimizing our course catalog and promoting highly qualified teachers, all of which helped to increase paid course enrollments. For example, we were able to increase our standard tuition fee for foreign language courses by an average of over 40% and for special interest courses by over 30%.
CNY 85.3 million in gross billings were generated by our foreign language professional and interest courses compared to CNY 20.7 million in the second quarter in 2018. Paid course enrollments were 42,000 in Q2 '19 compared to 26,000 in Q2 '18. Leveraging our know-how with online, live, large-class education, we will further expand into this large industry segment. Our core business has grown regularly as we continually improve retention and take advantage of word-of-mouth referrals, which also benefit from the strong and rising demand for online education. At the same time, we've managed to achieve and return profitable growth by improving our ability to control costs and operating expenses.
Our cost of revenues increased by 281% to CNY 101.2 million, up from CNY 26.6 million year-over-year. This increase was primarily due to our increased recruitment of teaching staff, including instructors and tutors. As we expand our business operations, we expect our cost of revenue to increase in absolute amount in the foreseeable future as we fill more students and offer more courses. Non-GAAP gross profit margin, which exclude share-based compensation, increased to 72.6%, up from 61.5% in the same period of 2018.
We operate a highly scalable business model. Teaching staff compensation, one of the largest cost add-ons, is declining as a percentage of net revenue primarily due to economics of scale. Average enrollments per class further increased from 980 in the first quarter in 2019 to around 1,200 in the second quarter. We are able to pay our teachers incrementally more while still enjoy greater operating leverage. The competitive compensation we provide to teaching staff, a by-product of our scalable business model, contributes to high teaching staff retention rate, which will benefit our students in the end.
Selling expenses increased to CNY 169 million, up from 18% -- CNY 18.4 million in the second quarter of 2018. The increase was primarily a result of more marketing expenses spent to extend market share to attract new students, especially for summer campaign and for brand enhancement.
Research and development expenses increased by 164.2% to CNY 41.1 million. We constantly work on ways to apply the latest technology to improve learning experience. This includes the efficiency and effectiveness of our teaching for data delivery as well as operational efficiency. We will continue to enhance our proprietary technology infrastructure, upgrade our system, optimize our IT tools and software, recruit talented personnel, and introduce and apply practical artificial intelligence technology. We also devoted more resources and plan to increase spending as we continue to develop our education content. Given that our revenue growth rate outpaces that of revenues net of R&D expenses, we believe we can still expand operating leverage despite the incremental investment in research and development.
G&A expenses increased by 194.3% to CNY 26.1 million, mainly due to an increase in G&A head count and an increase in related compensation. Income from operations increased to CNY 16.2 million from loss from operations of CNY 0.5 million in the same period of 2018. Non-GAAP income from operation, which excludes share-based compensation, increased to CNY 31.1 million from CNY 0.2 million in the same period of 2018. Operating margin, defined as income from operations as a percentage of net revenues, rose 4.6%. Non-GAAP operating margin increased to 8.8% from 0.2% in the same period of 2018.
We would like to highlight that operating margin shows distinct seasonality for K-12 after-school tutoring business, especially for online, live, large-class business model. We offer courses in 4 semesters, namely the 2 school semesters in spring and fall and 2 holiday semesters in summer and winter. The semesters do not perfectly match quarters on calendar. The revenue generated by winter and spring semester would swing substantially between first quarter and second quarter due to the floating schedule of spring festival. For instance, certain amount of net revenues moved from the second to the first quarter due to the early schedule of spring festival in 2019 compared to 2018, which results in a faster revenue growth rate in the first quarter of 2019.
In the second quarter, spring semester usually ends in the first week of June, which means that nearly 1/3 of the second quarter barely contributes to net revenues. At the same time, summer marketing campaign acquires higher investment in sales and marketing expenses. Those may lead to a lower level of operating margin in the second quarter compared with the full year margin. The same trend also applies to operating margin in the third quarter. In the summer semester, we provide very low promotional pricing to students in certain grade, especially at the start of a new level of school, for example, first grade, the seventh grade and the 10th grade. Revenue contributions from these promotion classes in summer semester is negligible, while summer marketing campaign continually lead to higher sales and marketing expenses. The fourth quarter will contribute the largest portion of gross billings, revenue and operating income during the year as fall semester starts with regular priced classes and the marketing activities become less intense.
Thanks to our strong organizational capability and operational efficiency, we have been profitable for 5 consecutive quarters from the non-GAAP perspective since the second quarter of 2018. We are one of the few, if not the only, leading players in the market that have achieved sustained profitability. In the future, we will continue to execute our pricing strategy, well-proven market strategy and provide students with the best-in-class learning experience.
Our basic and diluted net income per ADS were both CNY 0.04 in the second quarter. Non-GAAP basic and diluted net income per ADS, which excluded share-based compensation, were CNY 0.11 and CNY 0.10, respectively. Net operating cash flow for second quarter of 2019 was approximately CNY 193.8 million.
Now let's take a quick look at the key financials of balance sheet. As of June 30, 2019, we had CNY 60.1 million of cash and cash equivalents and CNY 1.7 billion of short-term investments. As of June 30, 2019, our deferred revenue balance was CNY 503.7 million. Deferred revenue primarily consists of the tuition collected in advance.
Lastly, I also like to take the moment to introduce progresses we have made to comply with online after-school tutoring regulation. On July 15, 2019, the China Ministry of Education, along with 5 other ministries and administration, published opinions in regulating online after-school tutoring. The detailed regulations are broadly in line with our expectations. As Larry just mentioned, we view the regulation as beneficial to the online education industry, particularly leading players including ourselves. In terms of licensing, we are compliant with the ICP and telecommunications business operating license.
In terms of teachers' qualifications, nearly 80% of our teachers are already qualified or have passed both written and the oral tests and are waiting for the registration. We have a robust pipeline of qualified teachers. In case certain teachers do not get their certificates before the grace period is over, we will be able to seamlessly substitute such teachers with minimal level of disruption to our students.
In terms of tutoring time [indiscernible], we are already compliant as all of our K-9 classes' end by 9 p.m. and, hence, we expect minimal changes to our K-9 operations in this regard. In addition, it is worth noting that the new regulation limits off-line access to tutoring to 8:30 p.m., whereas online classes can end at 9:00 p.m., further underlying the benefits of our model compared to our transitional off-line peers. Also in terms of homework, off-line tutors are not allowed to assign any homework at all, whereas in online channel, there are only restrictions for the first and second grade. We believe our current curriculum and teaching plans do not require any significant changes.
In terms of the 3 months or 6-day classes limit for upfront payment, we believe this regulatory stance provides greater clarity and consumer protections for both parents and students. It will motivate us to devise service and products of higher quality. We have promised to provide full refunds to parents and students at any time before the live class is over since we start this business. Considering our low refund rate and high retention rates, the reduction in payment period will have limited impact on us. Particularly, we believe we are more capable of guaranteeing the safety of prepaid tuition fees compared with a number of our peers, thanks to our profitable operations and the increasing brand recognition.
As one of the leaders in the online education space, we believe we are among the least impact by the largest -- by the latest regulation as we have been conducting our business in line with these policy aims, and believe that these policies will, in fact, further enhance our leadership position. We will continue to monitor the development of online education in China to continue to provide our shareholders with responsible guidance and effective execution and to continue to deliver strong financial and operational results over the long term.
With that, I now provide our business outlook. Based on our current estimate, net revenue for the third quarter of 2019 are expected to be between RMB 486 million and RMB 506 million, representing a projected increase of 390.9% to 411.1% on a year-over-year basis. These estimates reflects the company's current expectation, which are subject to change.
That concludes my prepared remarks. Operator, we are now ready to take questions. Thanks.