Good morning, ladies and gentlemen. Thank you for standing by, and welcome to Estácio's Conference Call to discuss the results for the Second Q uarter of 2018. This event is also being broadcast simultaneously on the internet via webcast, which can be accessed on the company's IR website, www.estacioparticipacoes.com.br/ri. We would like to inform you that all participants will only be able to listen to the call during the presentation. We will then begin the Q&A session when further instructions will be given. Should you need any assistance during the conference, please request the operator's help by pressing star zero.
This conference may contain forward-looking statements that are subject to risks and uncertainties that could cause the company's actual results to differ materially from those in the forward-looking statements. Such statements speak only as of the date they are made, and the company is under no obligation to update them in light of new information. Please note, this event is being recorded. I will now turn the conference over to Mr. Pedro Thompson, the company's CEO. Mr. Thompson, you may proceed.
Thank you. Good morning, everyone. Welcome to our conference call to discuss the results for the second quarter of 2018. Just to remind you all, there will be a Q&A session as soon as the presentation is over. Before beginning our presentation, I would like to announce a few recent changes in the IR department. After nine years working at Estácio as Head of the IR department, Flávia leaves the company to pursue new challenges. We would like to thank her for her dedication and important contributions to the company. To strengthen the department, we announce the arrival of Renato Campos as Department Manager. Renato worked at the IR department of BR Malls for four years. We also announce the new IR Officer, Rogério Tostes. Mr. Tostes worked as Statutory Investor Relations Officer at TIM for 10 years and as sell-side analyst in several industries for more than seven years.
The new additions to the IR team aim to improve the quality of communication with the market. Let's begin with slide number three of our presentation with some quarter highlights. I would like to emphasize that we remain focused on improving our operational performance, thanks to the initiatives to ensure revenue growth and efficiency gains in accordance with the planning that has been in place since 2017. Despite some adversities in 2017, especially in the first half of 2018, such as a reduction in government financing programs and a highly unstable economy scenario, we kept close to the business plan by improving nearly all of our financial and operational performance indexes. Those results arise from our commitment to the pursuit of operational excellence and focus on the company's continuity.
Regarding the quarter highlights on the first slide, net operating revenue totaled BRL 963.7 million, 5.5% up on the second quarter of 2017. Revenue increased despite the 26.4% decline in the FIES student base in the period, mainly to an increase in average ticket and improved student retention rates, which we will show in the detail below. It is worth noting that the non-FIES student base moved up 10.8%, of which 5.6% in the on-campus segment and 21.1% in the distance learning segment, as we will speak next. As a result of the projects and continuous efforts to improve efficiency, the second quarter cash cost of services accounted for 41.9% of the net operating revenue, a 5.9 percentage points margin gain.
Therefore, our gross profit came to BRL 536.1 million in the second quarter, 20% up on the same period in 2017, rectifying the plan of implement operational improvements announced at the end of 2017. We have been able to improve our operational performance. The EBITDA margin came to 31.8% in the first half of 2018, 4.7 percentage points more than 27.1% recorded in the first half of 2017 and above the average margin of 20.6% between 2014 and 2016. Excluding the non-recurring effects of the six-month period, EBITDA came to BRL 618.7 million with a margin of 32.6%, 5.4 percentage points more than in the first half of 2017. In terms of efficiency, we highlight our distance learning business that, despite a more challenging scenario, recorded an EBITDA margin of 74.4% in the first semester of 2018. Our net income reached BRL 236.9 million, 42.5% up on the second quarter of 2017.
At the close of June 2018, Estácio's cash balance totaled BRL 401 million. In August, we received the transfer of FIES' last installment of PN 23, totaling BRL 342 million. From May until the last disclosure, Estácio repurchased BRL 122.2 million in company shares. I would also like to highlight that in July 2018, the rating agents, S&P, reaffirmed Estácio rating at BR-AAA with a stable outlook, providing the company solid financial structure. Move on to slide four. We can see that the student base increased by 3.4% to 558,200 students. The highlights are 21.1% growth in the distance learning student base and in retention rates, which reached 85% in the on-campus segment and 80.9% in the distance learning segment, a significant improvement when compared with the same period in 2017. When analyzing the undergrad student base, excluding FIES, the increase was 5.6% on 2017.
In addition, the distance learning business unit is expanding the portfolio of courses in several courses in their own campus. In the first half of the year, 250 new distance learning courses were offered, and for the second quarter, more than 81 new courses of this type will be offered. Regarding the distance learning segment, we have 100% online platform and a special structure to support our partner centers. Therefore, we rapidly expanded the network of accredited centers, which moved up from 238 to 451 at the close of the second quarter of 2018, an increase of 230 centers over the second quarter of 2017. The expansion of distance learning centers is one of our strategic priorities for the coming years and has been our main growth driver since we authorized to open up to 350 new centers per year, given our academic excellence.
Another highlight was the 57.9% growth in the Flex student base. The Flex segment is a distance learning product that requires students to occasionally be present at our centers and has an average ticket of nearly double the average ticket of 100% online courses. The distance learning growth offset the 4.8% decline in the on-campus student base, which was under the effect of the 26.2% decrease in the FIES student base. Please note that the regular students base increased by 10.6% in both modalities, 5.6% of which in the on-campus segment and 21.1% in the distance learning plus Flex segment. Move on to slide five. I will talk a little bit about our average ticket.
In the second quarter of this year, the on-campus average ticket totaled BRL 799.8, an increase of 6.4% compared with the same period in 2017, mainly due to the impact of the new DIS campaign and the adjustment in senior students' monthly tuition in line with the inflation in the company's cost. The distance learning average ticket increased by 14.4% in the second quarter compared with the same period in 2017 to BRL 273.7. In the distance learning segment, we highlight the 58% increase in the Flex student base, which has a higher average ticket than the average ticket of 100% online courses, BRL 451.9 versus BRL 257.4, respectively. The 6% decline in the Flex segment ticket was due to the price repositioning, which contributed to the increase in the number of Flex enrollments.
I will now turn the floor over to Gustavo Zeno, our CFO, who will comment our financial results.
Thank you, Pedro. On slide seven, I will begin by talking about the performance of our net revenue in the quarter. The second quarter net operating revenue totaled BRL 963.5 million, 5.5% up on the same period in 2017, mainly due to BRL 108.1 million upturn in revenue from monthly tuitions due to the increase in average ticket and improved student retention rates. The discount and scholarships line improved by BRL 69.4 million due to the maturation of students who joined Estácio after the change in the company's pricing strategy. The effect of this strategy is offset by the increase in gross revenue.
There is less significant impact in other lines, and the most important was the BRL 9.5 million decrease in taxes due to the reversal of PIS and COFINS, our tax on revenues, recorded in the first quarter of 2018, resulting from the temporary effect of the loss of the ProUni benefit, which I will explain further on. Moving on to slide eight, I will talk a little bit about our operating costs. Our cash cost of service accounted for 1.9% of net operating revenue in the second quarter, representing a 5.9 percentage point margin gain, mainly in the personal line, due to the implementation of the new faculty career plan and the increase in the sharing of disciplines in the curriculum matrix. In the second quarter, our cash cost of service presented a reduction of 7.5% in relation to the second quarter of 2019.
In the relation of cost personal, which decreased by 11% due to the implementation of teaching career plans and increasing the level of sharing disciplines in the curriculum matrix. The personal cost line was impacted by BRL 3 million in the second quarter due to costs from the termination of administration employees. In other words, layoff expenses. We optimize our structure, following internal headcount efficiencies benchmarks effort with calculation of unit target size, implementation of appropriate quality services standards. Excluding this impact, the personal line accounted for 31.1% of net operating revenue, a 6.1 point margin gain instead of 5.8 points in comparison with 2017. In on-campus segment, other ongoing measures aim to improve the management of faculty costs and include the alternative routes, the increased offer of equivalent disciplines, and the offer of probation classes.
In distance learning segment, we implemented initiatives to improve teachers' efficiencies and response time interactions with students, which increased the average of students per class by 31%, from 158 in the second quarter of 2017 to 206 in this quarter, without affecting the quality of the service provided. The same initiatives implemented in the long-distance learning disciplines have also benefited the online disciplines offered in the on-campus segment. In addition to the improved management of personal costs, a 0.5-point margin reduction in rental costs also contributed to a margin gain in the quarter as more campuses merged in the 12 months when comparing with the number of new units opened. On line nine, we present our operating expenses. Selling expenses increased 34.5%, mainly due to higher expenses for allowance for doubtful accounts, PCLD.
To explain this variation, I would like to remind you that until December 31st, 2017, Estácio accrued 100% of the monthly tuition overdue for more than 180 days. As of January 1st, 2018, we started using a new standard on financial instrument, IFRS 9. The new rule amplified the seasonality between even and odd quarters of out-of-pocket students. There is no significant impact on this semester, just simplification in seasonality between the quarters. Accordingly, the allowance for doubtful accounts was lower in the first quarter of 2018 when comparing the second quarter of 2018. Given that in order to complete the enrollment of new students and senior students in the first quarter, the first fee of the semester must be paid, not generating accounts receivables for this monthly tuition in this first quarter.
Additionally, the accounts receivable recognized in the short term, 12 months, referring to 106,000 students who joined the DIS program in the first quarter of 2018, corresponds to approximately 25% of the total monthly tuition paid installments, only considering four-year courses. The quarter-on-quarter increase in PCLD was due to a seasonal upturn in accounts receivables, given that the above-mentioned mitigating factors do not occur in the second quarter. Moreover, the second quarter PCLD was also affected by 8.3 thousand students who joined the PEP financing program in the second quarter compared to the same period in 2017, in which the provisioning corresponds to 50% over the long-term accounts receivables net of AVP, BRL 10.8 million impact due to the dropouts and the non-renegotiated debt of PAR students in the same period.
In other words, the PAR students dropout net of AVP, and when there is no renegotiate of debt, we provision, besides the 50%, an addition of 50% more, reaching 100% provisions over the full accounts receivables of these students. Following BRL 1 million impact due to the provision of 15% of the long-term accounts receivable net of AVP of the diluted monthly tuition of students who joined the DIS program. Finally, BRL 7.3 million impact from dropouts of DIS students who did not pay and did not enter into any agreement. In other words, the provision rule between PAR and DIS is the same. The only difference is that we provision 50% on the due accounts receivables for PAR and 15% on this, DIS. The effects I have previously mentioned, less variation in PCLD of regular students in the second quarter.
However, this effect is mitigated when we analyze the semester. This slide also show another line of selling expenses, advertising expenses. We shift the marketing expenses curve because of the World Cup calendar. When we look at the semester, the margin gain came to 0.5 percentage points. Cash, general, and administrative expenses presented an increase of 20.5% in relation of second quarter of 2017, essentially due to third-party service expenses, mainly from non-recurring advisory expenses, which impacted this line by BRL 6.4 million this quarter, and which are non-recurring. We have been working major projects to increase performance with renewed advisory firms that generate one-off expenses, as Pedro explained before, and give further details further on.
Moving on to slide 10, we can see that the second quarter net income totaled BRL 236.9 million, 42.5% up on the second quarter of 2017 due to an improvement in gross profit, efficient project, and the renewal of fiscal of ProUni to historical levels of the company. ProUni tax benefits substantially fell in the first quarter of 2018. Because one of our subsidiaries had the benefits temporarily suspended for not having the tax debt clearance certificate. Consequently, the company fully recorded the income taxes and social contribution tax liability in the first quarter of 2018 without the benefits of ProUni in March. In the second quarter, we solved this problem and reviewed the first quarter tax basis in accordance with the effective law. Accordingly, the tax liability recognized in excess in the first quarter was reversed in the second quarter.
As we observed the semester, the ProUni tax benefit has returned to historical level and should be maintained throughout the year. Net income came to BRL 434.3 million in the first half of 2018, with a net margin gain of 6.2 basis points the first half of 2017, mainly due to BRL 135.4 million increase in EBITDA in the same period. Moving on to slide 11, we have the average receivables period. Estácio's average receivables days came to 126 in the second quarter, 21 days lower than the quarter of 2017. The FIES receivable days was 15 days lower than the second quarter of 2017, reaching 247 days due to the transfer of FIES second installments of PN 23, totaling BRL 167.4 million in August 2017. The average non-FIES receivable days were in line with the same period in 2017 at 75 days.
We remain focused on improving our collection and student debt renegotiation campaigns. Moving on to slide 12, we can see the information on our net debt cash CapEx in the first table. Our cash and cash equivalents totaled BRL 401 million on June 30, 2018, conservatively invested in fixed income instruments pegged to CDI interbank rates, in government bonds, and certificates of deposit in the top-tier Brazilian banks. This quarter, our cash position was impacted by BRL 44 million due to the payment of fiscal things and IRPJ and CSLL, which is basically our tax on revenues and tax on income, related to the ProUni impact mentioned earlier. We are going to compensate this impact, this BRL 44 million paid in the second quarter on tax revenues along 12 months and on tax on income in 2019. In other words, there is no impact on our income statements on ProUni going forward.
Our bank debt of BRL 426 million mainly corresponded to our debenture issues, the loans with IFC, the issue of promissory notes, subsidized financial from regional development banks, and the capitalization of equipment leasing expenses. The BRL 607 million year-on-year reduction was due to the settlement of the third debenture issue, the payment of the first tranche of the promissory note in November 2017, the settlement of the loan with IFC in May 2018, and the payment of a portion of the principal of the second and the fourth debenture issues in April and June 2019. Including banking loans, commitments payable for acquisitions, and tax payable installments, the Estácio gross debt totaled BRL 657.8 million. Quarterly, our net debt totaled nearly BRL 100 million, which means 0.1x our EBITDA.
Debt and operating cash generation levels allow the company to carry out its operating activities, meet financial commitments, and implement new expansion and growth strategy using its own funds as well as new financing means. I would like also to emphasize that in July, the rating agency S&P Global Ratings reaffirmed Estácio as a BR-AAA local rating with a stable outlook, proving the company's financial strength. Also, on this slide, we show our second quarter CapEx. We invested BRL 38.5 million, 13.6% more in the same period in 2017, essentially due to investments in buildings and improvements in the second quarter of this year. Moving on to slide 13. The operating cash flow before CapEx was positive in BRL 125 million, BRL 87 million less than the second quarter of 2019, essentially due to the payment of income taxes and social contributions of BRL 44 million.
As previously mentioned, this was a consequence of ProUni tax benefits that significantly fell during the temporary suspension of ProUni enrollment in our subsidiary. Consequently, the second quarter operation cash flow before CapEx to EBITDA conversion ratio was 45.7%. In this quarter, free cash flow was impacted by the company's shares repurchase with an investment of nearly BRL 80 million. As Pedro mentioned before, on August 2nd, Estácio received the transfer of FIES last installment of PN 23, totaling BRL 342 million. Estácio is well-positioned to capture opportunity growth by making the most of its capital structure. I will now turn the floor back over to our CEO, Pedro Thompson, for his closing remarks.
Thank you, Zeno. Move on to slide 14. I would like to emphasize that we are in a new phase with new projects that's improving our operational efficiency and are expected to begin showing significant results in the coming periods. We are looking out for the company's continuous revenue growth and student base. Regarding the efficiency projects, the highlights are strategic sourcing. We restructure our supply department, whose main purpose is to optimize 21 categories of the company global spending in order to obtain significant gains by reducing acquisitions price in the supplier base, as well as improving the quality of services delivered, ensuring better controls, and reducing financial expenses. The benefits of this initiative will be recurringly observed as of the second half of 2018.
Pricing. This initiative comprise strategic pricing review with greater granularity through in-depth analysis of prices, elasticity, optimization of the commercial policy on discounts and scholarships during the intake and renewal cycle, and creation of tools to improve revenue management. Consequently, the company has been investing in increasing its profitability and ability to approach the market on a granular basis by defining more specific strategies targeted at each student group and enabling effective communication in the market it operates. The benefits of this project will be observed as from 2019. Loyalty consists of reducing academic dropout rates and financial evasion, increasing renewal rates, and improving the student experience. We have already noticed tangible results of this initiative in the first semester.
The project consists in a detailed diagnostic that cover the student's entire journey based on the identification of the main dropout triggers and assessment of the company processes, as well as the detailing and implementation of initiatives designed to prevent students from dropping out. More than 80 initiatives have already been identified, 20 of which were implemented in the first half of 2018. We believe that dropout rates will significantly decline in the coming cycles, as was the case in the second quarter of 2018. Collection intelligence. Our aim is to increase overdue credit recovery volumes by improving the management of specialized collection firms, customizing initiatives for each overdue profile. As we have already mentioned during the call, we have a comfortable cash position to evaluate the best capital location opportunities.
On the organic growth front, the strategy is focused on the expansion of distance learning business, as well as on increasing the number of courses offered in all segments. In distance learning segment, the company has already achieved solid and sustainable returns compared with those of our competitors, driven by competitive advantages such as academic excellence, scalability of the technical platform, and local partnership. In addition, we continue focus on efficiency gains and student loyalty, strategies that have been in place since 2017 in order to expand the student base. That being said, Estácio begins the second half well-positioned with new expansion and efficiency gain projects, in addition to a more solid structure to capture growth opportunities. We can now move to the Q&A session. Thank you.
We will now begin the question and answer session. To ask a question, you may press star then one on your touch tone phone. If you are using a speakerphone, please pick up your handset before pressing the keys. To withdraw your question, please press star then two. At this time, we will pause momentarily to assemble our roster. As there seem to be no questions, I would like to turn the floor back over to Pedro Thompson for his closing remarks.
I would like to thank you all for participating in our results conference call. Our investor relations department is always at your disposal to help you with any questions you may have. Our contact information is available on our website. We hope to see you again at our conference call next quarter. Once again, thank you very much and have a great day.
Estácio Participações conference call is now over. Thank you all for joining us and have a good day. You may now disconnect.