---
schema_version: "1"
id: 76fcb16071fd6f83697612b2849e8a0f52c534a57b1d370ba76bbea4b1c42841
title: Cost Price
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_cost_price.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_cost_price.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ed4ffd7333f590a4e2aa174efef6d7e684e588c42094a162da8f4b00edc282df
description: Cost price is a fixed cost price imported into B2C Commerce for use in calculations. Cost price is a site-specific value and must be represented in the same currency used for purchases on the site.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Cost Price

Cost price is a fixed cost price imported into B2C Commerce for use in calculations. Cost price is a site-specific value and must be represented in the same currency used for purchases on the site.

Cost price:

- Isn’t staged and values are specific to each instance
- Has special handling for base products and products sets

## Standard Product

For a standard product that isn’t a base product or a product set, the cost price is imported and there’s no default value.

## Base Product

The cost price of a base product is equal to the average cost price of all variation products. B2C Commerce calculates the cost price using the following formula:

`Cost Price( _mp_ ) = SUM(Cost Price( _vpX_ )) / _X_`

Where:

_mp_ is a base product

_vpX_ are online variations of the base product. The `IsOnline` attribute must be set to true for a product to count as an online variation product.

_X_ is the number of online variation products.

Example 1: Not All Variation Products Online

This example shows how B2C Commerce computes cost price if not all variation products are online. In this case, product 1 is online and product 2 isn't.

Variation product 1 - IsOnline: true

Cost Price: 5.50

Variation product 2 - IsOnline: false

Cost Price: 10.75

base product

Cost Price: (5.50) / 1 = 5.50

Example 2: all variation products Online

This example shows how B2C Commerce computes cost price if all variation products are online.

Variation product 1 - IsOnline: true

Cost Price: 7.50

Variation product 2 - IsOnline: true

Cost Price: 2.50

Base product

Cost Price: (7.50 + 2.50) / 2 = 5.00

## Product Set

The cost price for a product set is the sum of the cost prices for every product in the set.

`Cost Price( _sp_ ) = SUM(Cost Price( _cpX_ ))`

Where:

_sp_ is a product set

_cpX_ are online products in the set:

Example 1: Not All Products Online

This example shows how B2C Commerce computes cost price if not all products in the set are online. In this case, product 1 is online and product 2 isn't.

Product 1 in set - IsOnline: true

Cost Price: 5.50

Product 2 in set - IsOnline: false

Cost Price: 10.75

Product set

Cost Price: = 5.50

Example 2: All Products Online

This example shows how B2C Commerce computes cost price if all products in the set are online.

Product 1 in set - IsOnline: true

Cost Price: 7.50

Product 2 in set - IsOnline: true

Cost Price: 2.50

Product set

Cost Price: (7.50 + 2.50) = 10.00