The dispute is a by-product of the worsening relations between Kiev and Moscow since Russia's annexation of Crimea and the eruption of Russian-backed separatist violence in Ukraine's Donbass region, which has killed more than 10,000 people.
In June 2014, Gazprom and Naftogaz lodged multi-billion-dollar claims against each other with a Stockholm arbitration court, which resolves commercial disputes.
Gazprom appealed a May ruling by the court over a 'take-or-pay' clause in a 2009-2019 contract between the two countries. Naftogaz on Friday said the court had again rejected Gazprom's $56 billion (£42 billion) claim on this issue and other points.
"Naftogaz won the gas sales arbitration case against Gazprom on all issues in dispute," Naftogaz said in an emailed statement.
It said the ruling was worth around $75 billion to Naftogaz in the long term, but did not give a breakdown on how it reached the estimate.
Meanwhile Gazprom said the court had satisfied most of Gazprom's claims and ruled that the main terms of the contract between Naftogaz and Gazprom were valid.
Gazprom said the Stockholm court had ordered Naftogaz to pay more than $2 billion to Gazprom for gas supply arrears and that it had also ordered Naftogaz to buy 5 bcm of gas from Gazprom annually from 2018.
With its claim, Naftogaz had sought a lower price for Russian gas and disputed the take-or-pay clause requiring buyers to pay for gas whether they take physical delivery or not.
In a separate claim with the Stockholm court, Naftogaz is seeking up to $16 billion from Gazprom in relation to a transit contract. A decision is expected in February 2018.
(Reporting by Pavel Polityuk and Denis Pinchuk; writing by Alessandra Prentice; editing by Matthias Williams and Adrian Croft)