If you run an ecommerce store and have ever tried to figure out what to charge for one of your products, this series is for you. You probably didn’t study economics in school and you might not have a PhD in data science. Fortunately, you don’t have to—we’ll cover everything you need to know to scientifically set prices for every item in your store.

Before diving into this post, make sure you’ve read Part 1, where we discuss how to build the demand curve for a product.

## Factoring Cost Into the Equation

In the last post, we did a lot of work to measure customer demand at a number of different prices for a product. So far, we haven’t even considered how much each item costs to sell.

Before setting the price for a product, you need to know how much it cost you to sell that item. I’ll explain why as we move forwards, but for now let’s just pause a minute to understand how to calculate a true cost of sales. Typically the components are:

**Manufacturing costs**: How much did it cost to manufacture or wholesale the product?**Marketing costs**: How much in marketing did it cost to attract this customer?**Service costs**: If there is post-sale service that you’re responsible for (like tech support), how much do you, on average, pay for this?**Warranty costs**: If there a product warranty, how much do you, on average, pay to service this?

There are several other possible items that could be included in the cost of sales for an individual product, but in the interest of simplicity let’s just stick with these four. Feel free to estimate where you don’t have hard numbers if you’re still early in the process of growing your online store. And if you’re a more mature company, check with your accounting department as they should have these numbers for you.

For this exercise, we’re going to assume that the cost to produce a product doesn’t change whether you’re selling 500 or 5,000 of them. In real life there may be economies of scale at higher production capacities, but we’ll leave that math for the professional economists.

**Calculate Your Total Profit**

It probably goes without saying, but **Profit equals Selling Price – Cost of Sales**. If you sell a product for $10 and the cost of sales is $6, you make $4 in profit.

This is when we circle back to the demand curve we built in Part 1. This time, we’re going to incorporate our cost of sales. The orange line in the graph below is Total Profit, which is calculated as Quantity x (Sales Price – Cost of Sales).

Want to know what price to set to maximize total profit? Just find the highest point on the orange line. In this example, the profit-maximizing price is $10.50, which yields a quantity of 1,030 units sold and a profit of $3,605.

## Pricing isn’t Art, it’s Science

Remember when people thought that you had to be a creative genius to build a website that got good conversion rates? Now we know that mere mortals can achieve great conversion rates with an A/B testing tool and an adherence to some straightforward principles.

Pricing is the same way. As long as you are methodical about process and measurement, you can be completely data-driven about your pricing policy. There is actually a best answer, it just takes a little bit of experimentation (and the right tools) to find it.

If you’re interested in learning more about how how our customers use RJMetrics to conduct this type of analysis, please drop us a line. We’d love nothing more than to help you become more profitable by setting the right prices for your products.

If you’re interested in grabbing the spreadsheet we used to produce these examples, you can get it here.