Set up margin calculation codes

Formulation Management  •  Article  •  10/6/2026  • 

A margin calculation code defines how prices are calculated from a formulation's unit cost on the Cost & price analysis page. Each code has a calculation method and one or more volume bands, each with its own target percentage. A code is reusable across formulations and adds no fields to the formulation card.

Calculation methods

Both methods are supported. They are different formulas, so the same target percentage gives a different price under each one.

MethodPriceTarget % from a priceExample on a cost of 10.78 at 50%
Cost-Plus MarkupCost × (1 + % ÷ 100)(Price − Cost) ÷ Cost × 10010.78 × 1.50 = 16.17
Gross Margin %Cost ÷ (1 − % ÷ 100)(Price − Cost) ÷ Price × 10010.78 ÷ 0.50 = 21.56

With Gross Margin %, the target percentage must be less than 100. Prices are rounded to the Unit-Amount Rounding Precision in General Ledger Setup.

Create a margin calculation code

To create or change margin calculation codes, you need the FORMMGTCOSTING199FDW permission set. Without it, the codes are read-only. For more information, see Manage permission sets.

To create a margin calculation code, follow these steps:

  1. Select the Search icon , enter Margin calculation codes, and then choose the related link. The Margin calculation codes page opens.
  2. On the action bar, select New.
  3. Fill in the fields on the General FastTab.

    FieldDescription
    CodeEnter a unique code for the margin calculation.
    DescriptionEnter a description.
    Calculation MethodSelect Cost-Plus Markup or Gross Margin %. The method applies to every volume band.
    Preview CostOptionally enter a unit cost to preview the price on each volume band. It is used only on this page and never changes any item or formulation cost.
  4. On the Volume bands FastTab, add one line per volume band.

    FieldDescription
    Qty FromEnter the lowest unit volume in the band. The bound is inclusive.
    Qty ToEnter the highest unit volume in the band. The bound is inclusive. Leave it blank for no upper limit.
    Target %Enter the target markup or gross margin percentage for the band.
    Price PreviewDisplays the price for the band at the Preview Cost. You can also enter a price here; the system then calculates the Target % that produces it.

You can add as many bands as you need. Bands must not overlap, but gaps between them are allowed. You can't change the calculation method to Gross Margin % while a band has a target percentage of 100 or more.

Set a default code by item category

The Cost & price analysis page selects a margin calculation code automatically from the item category of the formulation's product item.

To set a default margin calculation code, follow these steps:

  1. Select the Search icon , enter Item categories, and then choose the related link.
  2. Open the item category.
  3. In the Margin calculation code field, select the code.

A subcategory without its own code uses the code of its nearest parent category. When no category provides a code, the field on the Cost & price analysis page is blank, and you are prompted to select one. A code that you select on the page always takes precedence over the default.