When we buy a product, we usually only see the final price on the label, but behind that number there are several steps and expenses that influence pricing. To arrive at an ideal sales price, it is essential to take into account all the costs involved in production and marketing.
According to E-commerce Brasil, understanding the cost of a product involves much more than just setting the sales price. It is essential to map all direct and indirect expenses, including investments in marketing, advertising, communication with customers and partners, logistics, and product maintenance.
Many beginning entrepreneurs often have questions when it comes to setting a fair price for their product or service. Therefore, understanding how to calculate the cost of a product is crucial to ensure that the business does not suffer losses due to pricing errors.
With this in mind, we have prepared a practical guide on how to calculate the cost of a product, what points should be included in the formation of the sales price, ensuring safer, more strategic, and sustainable pricing to guarantee the financial health of your business.
What is the cost of a product?
When we talk about the cost of a product, we are not talking about estimates or hypothetical values. This cost represents, exactly, the expenses actually incurred to create the product or service, reflecting all the investment made in the stages already completed.
Therefore, it is important to emphasize that the cost of a product can only be determined after the production process is complete, as this is when all the resources used are properly recorded and measurable.

How to calculate the cost of a product?
Correctly calculating the cost of a product is essential to maintaining the financial health of the business and ensuring competitiveness in the market. To arrive at this figure, entrepreneurs need to consider a number of factors that directly influence the final result.
Among these, two fundamental pillars stand out: the costs and expenses involved in production and operation, and the profit margin that the company wishes to achieve.
It is not enough to simply add up the costs of production or purchase of the product; it is necessary to include other variables that impact the final value, such as logistics, fees, taxes, and commercial strategies. Below, we will detail each component.
It is worth noting that we use illustrative values and examples, which may vary according to each sector and region.
1. Costs and expenses
The starting point is to identify all costs associated with the operation. These are divided into fixed and variable costs, each playing an important role in the composition of a product’s cost.
Before setting the price, it is important to understand the difference between cost, expense, and loss:
- Cost: amount spent on the production or acquisition of the product;
- Expense: costs related to the sale or marketing of the item;
- Loss: unforeseen expenses that do not bring financial return.
Differentiating these elements helps you visualize where you can reduce expenses or avoid waste. The ideal is to seek a healthy balance: keep production costs lean, control operating expenses, and minimize losses.
Fixed costs are those that remain virtually stable, even if sales fluctuate. Some examples include:
- commercial space rental;
- fixed utility bills (electricity, water, internet);
- administrative salaries;
- partners’ pro-labore;
- system maintenance (such as ERP and CRM);
- accounting services;
- insurance;
- machine and equipment rental.
Variable costs, on the other hand, increase or decrease according to production or sales volume. These include:
- raw materials and supplies;
- packaging;
- sales commissions;
- payment platform or marketplace fees;
- sales taxes;
- shipping (when paid by the seller);
- paid advertising (such as Google Ads and Meta Ads);
- energy consumption directly linked to production.
A simple formula for identifying the total cost is:
TC (Total Cost) = DC (Direct Costs) + IC (Indirect Costs) + FC (Fixed Costs) + VC (Variable Costs)
2. Profit margin
With the total cost in hand, the next step is to define the profit margin, that is, the gain that the company expects to obtain above costs.
It is important not to confuse profit with high prices. Businesses that know their costs well are able to charge competitive prices and still maintain healthier margins.
For example, imagine two pizzerias on the same street. The first sells pizzas for $50, while the second charges $45. Both offer similar products, but the second may have higher profits if, for example, it pays less rent or has better conditions when purchasing supplies.
Efficient cost management has a greater impact on profitability than simply charging more. The profit margin can be calculated in two ways:
- Gross margin: indicates profit before deducting fixed expenses. Formula: (Selling price – Cost of goods sold) ÷ Selling price × 100
- Net margin: considers all expenses and taxes, showing actual profit. Formula: (Net profit ÷ Total revenue) × 100
If a product is sold for R$ 100 and costs R$ 60 to produce, the gross profit is R$ 40. Gross margin: (40 ÷ 100) × 100 = 40%
If there are still $20 in fixed expenses and taxes, the net profit is $20. Net margin: (20 ÷ 100) × 100 = 20%
Margins vary depending on the type of business:
- Retail trade: 30% to 50%
- Services: 20% to 60%
- Small industry: 15% to 30%
- Handcrafted or exclusive products: above 50%
Very high margins can drive customers away because of the price; very low margins can compromise the sustainability of the business. The ideal approach is to analyze the competition, target audience, and perceived value to define a balance point.
3. Choice of pricing method
After determining the costs and setting the profit margin, it is time to apply a pricing method. The most common ones are:
Margin on cost
The simplest method: add a percentage profit to the cost of the product. Example: cost of R$ 80 and margin of 30% → sale price: R$ 104.
Contribution margin
Calculates how much revenue remains after covering variable costs and expenses. Formula: MC = Selling price – (Variable costs + Variable expenses)
Example: A store sells a T-shirt for $50 each. Variable cost: $15 per item. Variable expenses: $5 per item. Selling 100 items: MC = ($5,000) – ($1,500 + $500) = $3,000
This amount covers fixed expenses and still generates profit.
Markup
Multiply the production cost by a factor that already includes profit margin and expenses. Example: Cost of $70 and markup of 1.8 → selling price: $126.
Markup formula: 100 ÷ [100 – (Variable expenses + Fixed expenses + Profit margin)]
4. Other factors to consider
In addition to costs and pricing methods, it is important to take other factors into account, such as competitors’ prices, as the market helps to identify possible limits for charging.
The value perceived by the customer and the positioning and experience of the customer can influence how much the consumer is willing to pay.

How to calculate the value of a service?
Setting the price of a service requires a similar approach to that used for products, but with special attention to factors such as time invested, labor, and technical knowledge.
Instead of raw material costs, the focus is on operating expenses, hours of dedication, and the profit margin you want to achieve. Below is a practical guide to arriving at a fair and sustainable charge.
1. Raise fixed and variable costs
Even if your business does not sell physical products, there are expenses that need to be covered. So start by listing your fixed costs, which remain relatively stable from month to month, such as:
- office or workspace rent;
- utility bills, internet, and telephone;
- software licenses (such as design, editing, or project management tools);
- salaries or pro-labore;
- accountant fees;
- marketing and transportation expenses.
Then, list the variable costs, which change depending on each customer or service provided. Some examples:
- travel to meetings or technical visits;
- support materials (paper, ink, specific equipment);
- commissions or hiring of third parties;
- platform or payment operator fees.
Having this survey organized helps you avoid underestimating expenses that, when added up, can have a significant impact on profitability.
2. Set the value of your working hour
Calculating your hourly rate is essential to establishing a clear basis for any service. This prevents arbitrary pricing and ensures that the effort and knowledge applied are properly remunerated.
Use the formula:
Hourly rate = (monthly fixed costs + desired monthly profit) ÷ total hours available for work in the month
Example:
- Fixed costs: R$ 2,000
- Expected profit: R$ 3,000
- Hours available per month: 160
Hourly rate = (2,000 + 3,000) ÷ 160 = R$ 31.25
With this calculation, you set a minimum rate for your services, ensuring that each hour worked contributes to covering expenses and generating profit.
3. Calculate the time required to perform the service
With the hourly rate set, estimate how much time is spent, on average, to deliver the contracted service.
Example: If a given project requires 10 hours of work, the cost of execution will be: 10 × $31.25 = $312.50
This estimate provides clarity on how much the work actually costs, even before considering other expenses or profit margin.
4. Include additional costs and profit margin
After defining the execution cost, it is time to add the specific expenses of the service (variable costs) and apply the desired profit margin.
Practical example:
- Time cost: R$ 312.50
- Variable expenses: R$ 50
- Subtotal: R$ 362.50
If the goal is to achieve a margin of 30%, use the formula:
- Final price = Subtotal ÷ (1 – margin)
- Final price = 362.50 ÷ (1 – 0.3) = R$ 517.85
This calculation ensures that all costs are covered and that the business is profitable.
5. Consider market and perceived value
In addition to the numbers, it is essential to assess the customer’s perception of value and analyze the prices charged by the competition. A highly specialized service that solves complex problems or adds unique benefits tends to allow for higher prices.
Therefore, adapt the value according to the positioning of your business and the profile of your target audience, seeking a balance between competitiveness and profitability.
Have you learned how to calculate the cost of a product?
We hope this content has been useful in helping you understand how to calculate the cost of a product, making it easier to set a fair price for your products and services.