Toward the end of The Hobbit after the fearsome dragon Smaug has been defeated by Bard's remarkable arrow, Thorin, Bard, and the Elvenking all proceed to haggle over possession of the treasure, all feeling that they have some claim to the contents. Of course, Thorin feels that it is all rightfully his, since he is the heir to the old King under the Mountain.
Ultimately, Bilbo helps ease their negotiation by cleverly presenting Bard and the Elvenking the Arkenstone, Thorin's most sought-after treasure. Using the Arkenstone, which Bilbo valued as his share in their negotiations, Bard negotiates a portion, roughly one-fourteenth of the treasure, from the dragon's hoard in exchange for the stone. Before their negotiation can be finalized and the gold and silver exchanged, the Goblins arrive and the Battle of the Five Armies begins.
Following the battle and Thorin's death, his cousin Dain sees that his agreement with Bard is honored and pays him one-fourteenth of the hoard. Bard divides this among the Lake-men and the elves.