Barrick Gold Corp reported a nearly 19% rise in second-quarter profit on Monday, beating analysts' expectations thanks to higher copper output, even as inflation drove the miner's cost of production up.

The world's second-biggest gold miner stuck to its cost forecast for the year and said it was on track to meet copper and gold production guidance.

Barrick produced 120 million pounds of copper in the second quarter, up 25% from the first quarter, while gold output rose marginally to 1.043 million ounces from 1.041 million ounces. Copper and gold are often found in the same ore, making copper a common byproduct of gold mines.

Net earnings stood at $488 million, or 27 cents per share, for the quarter ended June 30, compared with $411 million, or 23 cents per share, a year earlier. Earnings and revenue for the quarter beat analysts' estimates, according to Refinitiv data.

However, in a sign of the impact surging inflation is having on Barrick, all-in sustaining costs per ounce of gold - a measure of the cost of production - for the first half increased 13% from the same period last year, while all-in sustaining costs per pound of copper jumped 15%.

For the first half, adjusted earnings before interest, tax, depreciation and amortisation (EBITDA) was down 10% from the same period a year ago, due in part to a 5% fall in gold production.

Project capital expenditure also jumped by 23% in the first half of this year as Barrick pushed ahead with expanding its Pueblo Viejo mine in Dominican Republic, while free cash flow fell by 24%.

(Reporting by Arunima Kumar in Bengaluru; Editing by Shinjini Ganguli, Emelia Sithole-Matarise and David Evans)