* Company declared 41 wells dry, non-commercial in Q2 * Petrobras says output to return to 2011 levels in Q4 * Company has much to do to improve results, CEO says * Stock trims losses after executives' remarks By Jeb Blount and Leila Coimbra RIO DE JANEIRO, Aug 6 Brazil's state-run oil giant Petrobras sought to ease investor concerns on Monday after posting its first quarterly loss in 13 years, saying the main factors behind the disappointing numbers are likely to ease in the coming months. Petrobras' preferred shares, the company's most-traded class of stock, trimmed early losses of more than 5 percent in Sao Paulo to close little changed from Friday after the executives comments. The share price, which fell 0.1 percent to 19.92 reais, remains near three-year lows. The sharp depreciation of Brazil's currency against the dollar, the main cause of the company's first loss since 1999, is not expected to happen again in coming quarters, company executives said in a webcast with analysts. That should prevent the cost of debt and fuel imports from rising. Increases in gasoline and diesel prices should cut losses in Petrobras' refining unit while new production systems should allow oil output to recover or slightly exceed 2011 levels by the end of the year, the executives said. A more than fourfold increase in exploration and production costs, sparked by the closing of 41 dry frontier region wells drilled between 2009 and 2012, were a one-time write off, company officials said. "We won't repeat such a large number of dry wells in the second half," Chief Executive Maria das Graças Foster told reporters at company headquarters in Rio de Janeiro. "We have a lot to do in the company to improve our results." Petrobras posted on Friday a net loss of 1.35 billion reais ($665 million) in the second quarter, compared with a net gain of 10.9 billion reais a year earlier. None of the nine analysts surveyed by Reuters before the announcement expected a loss. Their average estimate was for a 3.69 billion real profit. The results have fanned concerns that the company, hampered by government intervention and soaring costs, will fail to meet its goal of becoming one of the three biggest crude producers by the end of the decade. "These results are very disappointing even considering the fact that they include one-time events," said Karina Freitas, oil and gas company analyst with Concordia Corretora, a Sao Paulo brokerage, in a note to investors. "Higher demand and lower production, seasoned with a currency devaluation, create a very indigestible result." The biggest impact on results was from the currency, Foster said. Brazil's real was an average 18 percent weaker in the second quarter than it was a year earlier. Lower returns from crude sales also hurt as production fell. Brent crude oil, a benchmark for world prices, was 7 percent lower in the period. Output fell 1.1 percent. OUTPUT FALLS Output dropped even as the company ramped up its $237 billion 2012-2016 investment plan, the world's largest corporate investment program, which estimates an average spending of about $130 million a day for five years. Petrobras hopes the plan will help the company more than double total output to about 5.4 million barrels of oil and natural gas a day (booed) in 2020, enough to put it in the top three, from about 2.5 million boepd now. No major increases, though, are expected until 2015. Still, Petrobras said that operations will improve. New gasoline and diesel refining units should boost domestic output of fuel, reducing the need for imports, executives said. "WON'T HAPPEN AGAIN" If the company delivers, the coming quarters should show better performance, Dany Rappaport, who oversees 250 million reais in assets for InvestPort in Sao Paulo, told Reuters Friday. "The convergence of factors, exchange rates, dry wells, fuel imports, won't repeat themselves in the coming quarters," Foster said. Several analysts, including Lilyanna Yang of Swiss bank UBS's Sao Paulo office, maintained their "buy" recommendations on the stock. Paul Chang of Barclay's New York office maintained his "overweight" recommendation and says the company's U.S. traded stock could rise 62 percent. Improvements to refining-unit transportation systems should also boost efficiency in a refining unit that posted a 7 billion real loss in the second quarter, a loss more than 50 percent larger than in the first quarter, executives said. The company is also moving to narrow the gap between international fuel and crude prices and fuel prices in Brazil. Brazil's government allowed Petrobras to raise wholesale prices of gasoline and diesel for the first time in six years in June. While Petrobras still sells fuel at a loss, Foster said she is committed to bringing local prices in line with world prices.