What is the formula to arrive the cost of a product?

What is the formula to arrive the cost of a product?