Work out product margins after discounts and returns

A draft product-level margin table with a row-level calculation trail and missing-cost/return exceptions.

Choose one of three approaches. The steps for that option appear below.

Choose an option above. On a phone, swipe the tabs left or right to see all options →

ChatGPT: calculates margins in Python, you recalculate

ChatGPT runs a code-backed margin calculation on a structured export. You inspect the code and recalculate samples.

  1. You

    Get CSV, rules ready

  2. ChatGPT

    Calculate in Python

  3. You

    Check and save pack

  1. Get the CSV and rules ready

    Use: You

    Have ready: sales-line CSV (product, transaction ID, units, gross sales, discounts, returns, currency, approved variable costs) and sign convention, period cut-off, tax treatment, contribution-margin definition.

    Check

    Stop if upload permission is absent. Verify date, currency, completeness and the supplied rules; do not replace missing rules with guesses. Keep inputs in an access-controlled local draft.

  2. Draft the margin table and exceptions

    Use: ChatGPT

    Only the approved input package from step 1: attach the CSV, paste the rules. ChatGPT shows Python code, row counts, assumptions and exception rows.

    Details

    What to paste into the tool

    Task: Produce a draft product-level margin table with a row-level calculation trail and missing-cost/return exceptions. Inputs: [ATTACH: the approved sales, discount, return and cost CSV from step A-1] [PASTE: sign convention] [PASTE: contribution-margin definition] [PASTE: period cut-off] [PASTE: approved tax treatment, including whether sales and costs include or exclude tax]. Use only these inputs. Show the Python used and a row-level audit trail with source IDs. Apply only the supplied contribution definition. Keep return and discount signs explicit. Do not treat contribution as net profit. Do not allocate overhead unless the owner supplies a rule. Keep currencies separate; use 'not stated' where costs or treatment are absent. Flag zero or negative net sales before computing margin percentages. Never silently drop or repair rows. Report missing facts as 'not stated'. Do not access accounts or external sources, send messages, post entries, change the master ledger, sign, publish or pay. Produce a draft for human review only.

  3. Check the output and save the pack

    Use: You

    Check the output, correct or reject it; save locally, marked draft. Product totals reconcile to included sales rows and approved costs with the agreed formulas.

    Check

    Recalculate a normal sale, discounted sale, return, zero-sales row and missing-cost item. Zero denominators: 'not stated'. Do not send, sign, pay, publish, post journals or update master records.

Before you paste into any AI tool, remove any confidential information. Put it back at the end.

Tools in this workflow

Deciding between ChatGPT and Claude for this? See the comparison.

Final check

Never paste credentials or full payment details.

Confirm authorised inputs and rules before use.

Independently recalculate a normal sale, discounted sale, return, zero-sales row and missing-cost item. Tie product totals to transaction totals by currency; verify percentages use the approved denominator.

Reconcile completeness and totals, preserve open questions, and save only a draft.

Check the result against your original inputs. Approve it before sharing or acting.

Availability notes

Based on official product documentation checked on 2026-10-29.

What still needs checking
  • Results on your own data depend on your inputs and rules. Always check the output yourself.
  • Owner-approved inputs and policy conventions must be supplied at use time.

Share this page