{"id":148687,"date":"2026-09-27T11:10:05","date_gmt":"2026-09-27T11:10:05","guid":{"rendered":"https:\/\/docs.daftra.com\/tutorial\/%d9%83%d9%8a%d9%81-%d9%8a%d9%8f%d8%ad%d8%b3%d8%a8-%d9%85%d8%aa%d9%88%d8%b3%d8%b7-%d8%a7%d9%84%d8%aa%d9%83%d9%84%d9%81%d8%a9-%d9%81%d9%8a-%d8%a7%d9%84%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d8%ac\/"},"modified":"2026-10-04T11:33:38","modified_gmt":"2026-10-04T11:33:38","slug":"how-average-cost-is-calculated-in-the-system","status":"publish","type":"tutorial","link":"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/","title":{"rendered":"How Average Cost Is Calculated in the System"},"content":{"rendered":"<div dir=\"ltr\" lang=\"en\">\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The system calculates the cost of each product automatically using the moving weighted average method: whenever a new quantity comes in at a different price, the unit&#8217;s average cost is recalculated based on the existing quantity and its price and the new quantity and its price. This average is what appears on the product page as Average Cost Price, and it is what is used to calculate the cost of sales, the invoice profit, and the inventory value. This guide explains the formula, which movements change the average and which don&#8217;t, and how the system handles discounts, currencies, and backdated movements.<\/p>\n<div style=\"display: flex; gap: 10px; background: #f6f8fb; border-left: 4px solid #1a56db; border-radius: 6px; padding: 14px 16px; margin: 0 0 18px;\">\n<p><span style=\"flex: 0 0 auto; font-size: 18px; line-height: 1.6;\">\ud83d\udec8<\/span><\/p>\n<p style=\"margin: 0; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Note:<\/strong> the average is one per product across all warehouses, not a separate average for each warehouse. Buying a quantity in one warehouse changes the product&#8217;s cost in all warehouses.<\/p>\n<\/div>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">The Average Cost Formula<\/h2>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">When a quantity that affects the average comes in (such as a purchase invoice), the system calculates:<\/p>\n<div style=\"background: #f6f8fb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 14px 16px; margin: 0 0 18px; line-height: 1.9; font-size: 16px; color: #111827; font-weight: bold;\">New average cost = (current average \u00d7 current quantity + incoming quantity \u00d7 incoming unit price) \u00f7 (current quantity + incoming quantity)<\/div>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Current quantity:<\/strong> the product&#8217;s total balance across all warehouses before the movement&#8217;s date.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Incoming unit price:<\/strong> the purchase price after deducting discounts, converted to your account&#8217;s default currency at the exchange rate on the movement&#8217;s date.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Movements are calculated in the order of their dates, not the order in which they were entered.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Movements in Draft or Under Delivery status don&#8217;t enter the calculation until they are executed.<\/li>\n<\/ul>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Example:<\/strong> you have 6 units at an average cost of 100, and you bought 14 units at a price of 125.<\/p>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">New average = (100 \u00d7 6 + 125 \u00d7 14) \u00f7 (6 + 14) = 2,350 \u00f7 20 = 117.5<\/p>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Movements That Change the Average Cost<\/h2>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Movement<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Effect on the Average<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Purchase invoice (or the addition requisition linked to it)<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Changes it by the purchase price after the discount.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Manual stock addition (Add Stock Operation) or a stock addition requisition<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Changes it by the unit price written in the movement. If you leave the price as is, the current average cost is suggested, so the average doesn&#8217;t change.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Finished product and waste from a manufacturing order<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Change it by the manufacturing cost.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Refund invoice and credit note<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Depending on the &#8220;Returns Cost Calculation Method&#8221; setting (see below).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Movements That Don&#8217;t Change the Average Cost<\/h2>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">These movements take the current average cost as their price, so the average doesn&#8217;t change:<\/p>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Sales invoices and manual issues: the cost of the unit sold is recorded at the average cost on the date of sale.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Purchase returns and purchase debit notes: goes out at the average cost on its date, not at the original purchase price.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Stock transfers between warehouses.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The stocktaking sheet (surplus or shortage).<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Issuing raw materials for a manufacturing order.<\/li>\n<\/ul>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">The Returns Cost Calculation Method<\/h2>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">From Product Settings \u2192 System Defaults, the Returns Cost Calculation Method setting determines at which cost returns go back into stock:<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Option<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">What Happens<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">By Selling Price<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The returned quantity goes back at the cost recorded for it in the original sales invoice, and the return enters the average calculation.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">By Latest Average Cost<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The returned quantity goes back at the current average cost at the time the return is created, so the average doesn&#8217;t change.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">This setting applies to all branches.<\/p>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">How the System Works<\/h2>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">Discounts and Taxes<\/h3>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The line discount, and the line&#8217;s share of the invoice&#8217;s total discount, are subtracted from the unit price.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Exclusive tax doesn&#8217;t enter the cost. Inclusive tax is extracted from the price first, so the cost is always without tax.<\/li>\n<\/ul>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">Currencies<\/h3>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">If the purchase invoice is in a foreign currency, the price is converted to the default currency at the exchange rate on the movement&#8217;s receipt date.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">If you edit the local currency rates for a past date, the average cost is recalculated for the products that have movements from that date.<\/li>\n<\/ul>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Example:<\/strong> buying 10 units at a price of 20 dollars with a discount of 2 dollars per unit, and an exchange rate of 50: the unit price entering the formula = (20 \u2212 2) \u00d7 50 = 900 in the default currency.<\/p>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">Purchase Expenses (Shipping and Customs)<\/h3>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Purchase expenses don&#8217;t enter the cost automatically. To charge them to the products&#8217; cost, use expense allocation from the addition requisition linked to the purchase invoice; the allocated expense value is then added to the cost of each line.<\/p>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Backdated Movements, Editing, and Deleting<\/h2>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">When a movement is added, edited, or deleted with a past date, the system recalculates the average for all movements from that date until today.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The cost of later sales invoices changes, their cost of sales entries are reposted, and the activity log shows that the average cost price changed.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">If the date is older than 3 days, the recalculation is done in the background, so the new average may appear after a few minutes.<\/li>\n<\/ul>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Example:<\/strong> you have 10 units at an average of 100, and you sold 4 units on January 5 (their cost is 400). Then you added a purchase invoice dated January 3: 10 units at a price of 130.<\/p>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The system recalculates from January 3: average = (100 \u00d7 10 + 130 \u00d7 10) \u00f7 20 = 115, so the cost of the January 5 sales invoice becomes 4 \u00d7 115 = 460 instead of 400, and its entry is adjusted.<\/p>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">Zero and Negative Stock<\/h3>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">If the balance is zero, the average becomes the price of the incoming quantity itself.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">If the balance is negative (when negative stock is allowed) and a quantity comes in at a price, the average becomes the price of that quantity directly, without weighting.<\/li>\n<\/ul>\n<div style=\"display: flex; gap: 10px; background: #fff8e6; border-left: 4px solid #d97706; border-radius: 6px; padding: 14px 16px; margin: 0 0 18px;\">\n<p><span style=\"flex: 0 0 auto; font-size: 18px; line-height: 1.6;\">\u26a0<\/span><\/p>\n<p style=\"margin: 0; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Warning:<\/strong> selling while stock is negative records an inaccurate cost, because the quantity is sold before its purchase price is known. Record purchase invoices with their correct date before sales invoices to get accurate cost and profits.<\/p>\n<\/div>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Where the Average Cost Appears<\/h2>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Location<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">What It Shows<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The product page in Products<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The Average Cost Price card. It appears for those who have the permission to add or edit products or purchase invoices.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The Invoice Profit tab in a sales invoice<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">For each line: the selling price, the average price, and the profit. It appears when the &#8220;Profit Tab in Invoice&#8221; setting is enabled and you have the permission to view profit.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Cost of Sales entry<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">From the cost of sales account to the inventory account, at the value of the average cost \u00d7 the quantity sold.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Item Sales Profits report<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The total cost and profit for each item.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Estimated Inventory Value report<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The inventory value at the average purchase price or at the purchase price, depending on your choice.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Stock movement<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The cost of each movement and the balance after it.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Related Settings<\/h2>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Selling Below Average Cost<\/strong> (in the sales settings): determines whether an item may be sold at a price lower than its average cost.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Returns Cost Calculation Method<\/strong> (in the inventory settings): as in the previous section.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The system has no option for another costing method such as First In, First Out (FIFO); the weighted average is the approved method.<\/li>\n<\/ul>\n<h2 style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Frequently Asked Questions<\/h2>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Why did the profit of an old sales invoice change?<\/strong> Because a purchase or addition movement was entered, edited, or deleted with a date earlier than the invoice, so the average and the invoice&#8217;s cost were recalculated.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Why is the average cost different from the last purchase price?<\/strong> Because the average combines all the existing quantities at their prices, not just the last invoice.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Does each warehouse have a different average cost?<\/strong> No, the average is one per product across all warehouses.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Why didn&#8217;t the average change after a stock transfer or stocktaking?<\/strong> Because these movements are recorded at the current average cost and don&#8217;t affect it.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">I edited an old purchase invoice and the average didn&#8217;t change immediately. Why?<\/strong> Because the recalculation for dates older than 3 days is done in the background; wait a little, then refresh the page.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Does tax enter the cost?<\/strong> No, the cost is always without tax.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">How do I add the shipping cost to the product&#8217;s cost?<\/strong> From expense allocation on the addition requisition linked to the purchase invoice.<\/li>\n<\/ul>\n<\/div>\n","protected":false},"author":17,"featured_media":0,"template":"","categories":[2182,2177,2184],"tags":[5436,19447,5048,19450,19452,19448,2333,19446,19449,19451,5437,19453],"class_list":["post-148687","tutorial","type-tutorial","status-publish","hentry","category-requisitions","category-inventory","category-products-services","tag-average-cost","tag-average-cost-price","tag-cost-of-sales","tag-expense-allocation","tag-how-is-average-cost-calculated","tag-inventory-value","tag-invoice-profit-en","tag-moving-weighted-average","tag-negative-stock","tag-returns-cost-calculation-method","tag-selling-below-average-cost","tag-why-did-the-profit-of-an-old-invoice-change"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How Average Cost Is Calculated in the System - Daftra Knowledge Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How Average Cost Is Calculated in the System - Daftra Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"The system calculates the cost of each product automatically using the moving weighted average method: whenever a new quantity comes in at a different price, the unit&#8217;s average cost is recalculated based on the existing quantity and its price and the new quantity and its price. This average is what appears on the product page [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/\" \/>\n<meta property=\"og:site_name\" content=\"Daftra Knowledge Base\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-04T11:33:38+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.daftra.com\/#website\",\"url\":\"https:\/\/docs.daftra.com\/\",\"name\":\"Daftra Knowledge Base\",\"description\":\"Daftra\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.daftra.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/#webpage\",\"url\":\"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/\",\"name\":\"How Average Cost Is Calculated in the System - Daftra Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\/\/docs.daftra.com\/#website\"},\"datePublished\":\"2026-09-27T11:10:05+00:00\",\"dateModified\":\"2026-10-04T11:33:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.daftra.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How Average Cost Is Calculated in the System\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How Average Cost Is Calculated in the System - Daftra Knowledge Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/","og_locale":"en_US","og_type":"article","og_title":"How Average Cost Is Calculated in the System - Daftra Knowledge Base","og_description":"The system calculates the cost of each product automatically using the moving weighted average method: whenever a new quantity comes in at a different price, the unit&#8217;s average cost is recalculated based on the existing quantity and its price and the new quantity and its price. This average is what appears on the product page [&hellip;]","og_url":"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/","og_site_name":"Daftra Knowledge Base","article_modified_time":"2026-10-04T11:33:38+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/docs.daftra.com\/#website","url":"https:\/\/docs.daftra.com\/","name":"Daftra Knowledge Base","description":"Daftra","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.daftra.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/#webpage","url":"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/","name":"How Average Cost Is Calculated in the System - Daftra Knowledge Base","isPartOf":{"@id":"https:\/\/docs.daftra.com\/#website"},"datePublished":"2026-09-27T11:10:05+00:00","dateModified":"2026-10-04T11:33:38+00:00","breadcrumb":{"@id":"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/docs.daftra.com\/en\/tutorial\/how-average-cost-is-calculated-in-the-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.daftra.com\/en\/"},{"@type":"ListItem","position":2,"name":"How Average Cost Is Calculated in the System"}]}]}},"_links":{"self":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial\/148687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/types\/tutorial"}],"author":[{"embeddable":true,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/users\/17"}],"version-history":[{"count":3,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial\/148687\/revisions"}],"predecessor-version":[{"id":148698,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial\/148687\/revisions\/148698"}],"wp:attachment":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/media?parent=148687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/categories?post=148687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tags?post=148687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}