A formula can produce a price with many decimal places, but a customer normally pays an amount expressed in cents. Rounding is therefore part of the pricing rule. Rounding to the nearest cent minimizes the numerical difference, while rounding upward protects a minimum price or margin threshold. Neither rule establishes customer demand, and a chosen price ending should be tested against the same cost model as any other price.
Worked calculation
Price before rounding = cost ÷ (1 − target margin); realized margin = (rounded selling price − cost) ÷ rounded selling price
Suppose unit cost is $17 and target gross margin is 37% of sales. The calculated price is $17 divided by 0.63, or $26.98412698. Rounding to the nearest cent gives $26.98. That price produces $9.98 gross profit and a margin of approximately 36.9904%, slightly below the target. Rounding upward to $26.99 produces $9.99 gross profit and approximately 37.0137%, just above the target.
If a store instead uses a $26.95 price ending, gross profit is $9.95 and margin is approximately 36.9202%. A $27.00 price gives $10 of gross profit and a 37.0370% margin. None of these differences is large per unit, but 10,000 identical sales create a $500 revenue difference between $26.95 and $27.00 before any volume response or price-related costs. Keep those assumptions explicit; the calculation is not a prediction that one price earns more overall.
| Price rule | Selling price | Gross margin |
|---|---|---|
| Nearest cent | $26.98 | 36.9904% |
| Round upward to a cent | $26.99 | 37.0137% |
| Selected ending | $26.95 | 36.9202% |
| Whole dollar | $27.00 | 37.0370% |
Decision checks and limits
Round the final transaction price once, then recalculate the actual margin from that rounded price. Do not round the target margin, cost components, or intermediate division repeatedly. When a processor or marketplace rounds each charge separately, reproduce that documented settlement sequence in a reconciliation rather than expecting a rounded monthly aggregate to match perfectly. A displayed 37.0% margin may represent values on either side of a strict 37% threshold.
For quantity quotes, decide whether the contract uses a rounded unit price multiplied by quantity or an independently rounded order total. At an unrounded unit price of $26.98412698, 100 units total approximately $2,698.41 before per-unit rounding; 100 units priced at $26.99 total $2,699.00. That $0.59 difference comes from the billing rule. State the rule on the quote, retain calculation precision internally, and show dollar results to cents without concealing whether the target was met.
Apply the calculation
-
Preserve precision
Store the original cost and target rate. Calculate the unrounded required price before applying the chosen billing rule.
-
Recalculate the outcome
Use the actual customer price to calculate gross profit and margin. Compare the unrounded margin with the target threshold.
-
Document quantity treatment
Make unit-price and total-price rounding consistent with the quote and invoice so staff can reproduce any small differences.
Method references: OpenStax: Contribution margin. Accessed October 22, 2026. All dollar figures are hypothetical worked examples.
Related calculators & guides
- Profit Margin Calculator
- Markup Calculator
- Markup vs Margin Chart
- How to Price a Product
- Markup vs Margin: What Is the Difference?
- Revenue, Profit, and Cash Flow: Three Different Numbers
- Gross Margin vs. Net Margin: What Each Includes
- Weighted Average Margin: Weight by Revenue
- Target Margin vs. Target Profit Dollars
- Price Increases After Costs Rise: Two Targets
- Margin Percentage Points vs. Percent Change
- Minimum Selling Price: Define the Cost Floor
- Wholesale vs. Retail Pricing: Follow Both Margins
- Cost-Plus vs. Value-Based Pricing: A Working Comparison
- Weighted Margin Calculator
- Price Change Volume Calculator
- Profit and Margin Bases Reference
- Pricing and Product Cost Playbook
Report an error
Thank you! Your feedback helps us make this page better.
Could not send. Please try again.