how to get the answer of a unit price

divide cost by how many units.

For instance, if you pay 4 dollars for 1lb and 3 oz, total 19oz, unit price is

4/19 dollars/oz