Skip to main content

Profit Calculation Formula

This document is the implementation reference for the Business Calculator > Profit Calculation subpage in the Kesles Merchant app.

Active implementation reference:

  • business_profit_calculator_page.dart

Input

The calculator currently uses three main inputs:

  • Cost per product
  • Selling price
  • Estimated quantity sold

Main Formulas

1. Profit per product

profit_per_produk = harga_jual - modal_per_produk

2. Total cost

total_modal = modal_per_produk x jumlah_terjual

3. Estimated revenue

estimasi_omzet = harga_jual x jumlah_terjual

4. Total profit

keuntungan_total = profit_per_produk x jumlah_terjual

5. Margin

margin_persen = (profit_per_produk / harga_jual) x 100

Notes:

  • if harga_jual <= 0, margin is forced to 0

6. ROI on Cost

roi_persen = (keuntungan_total / total_modal) x 100

Notes:

  • if total_modal <= 0, ROI is forced to 0

7. Break Even

Current implementation:

break_even_unit = ceil(total_modal / harga_jual)

Important notes:

  • if harga_jual <= 0 or total_modal <= 0, internal result becomes 0
  • in the UI, Break Even will be displayed as Not Possible if profit_per_produk <= 0
  • this formula is still based on total period cost, not the fixed cost + profit per unit model

Insight Criteria

The bottom insight section uses the following rules, evaluated top-down.

Initial validation conditions

  • if jumlah_terjual <= 0
    • shown: Enter quantity sold
  • if harga_jual <= 0
    • shown: Selling price not yet valid
  • if harga_jual < modal_per_produk
    • shown: Selling price is still below cost
  • if harga_jual == modal_per_produk
    • shown: Selling price has not produced profit yet

Profit and margin conditions

  • if total_profit <= 0
    • shown: Simulation indicates a loss
  • if margin < 10%
    • shown: Business margin is very thin
  • if margin >= 10% and < 20%
    • shown: Business margin beginning to form
  • if margin >= 20% and <= 50%
    • shown: Business margin looks healthy
  • if margin > 50%
    • shown: Margin very high, recheck selling price

Insight Description Rules

The insight description also adapts to the condition:

  • loss because harga_jual < modal
    • explains the loss per product and total loss
  • break-even because harga_jual == modal
    • explains that the selling price only covers cost
  • margin < 10%
    • emphasises that profit is very thin and easily eroded by additional costs
  • margin 10% - <20%
    • emphasises that profit is present, but still needs to be guarded
  • margin > 50%
    • emphasises that the selling price needs to be re-checked to remain realistic
  • normal healthy condition
    • displays the estimated revenue and total cost

Calculation Examples

Example 1

Input:

  • cost per product: Rp 100,000
  • selling price: Rp 150,000
  • quantity sold: 100

Result:

profit_per_produk = 150.000 - 100.000 = 50.000
total_modal = 100.000 x 100 = 10.000.000
estimasi_omzet = 150.000 x 100 = 15.000.000
keuntungan_total = 50.000 x 100 = 5.000.000
margin = (50.000 / 150.000) x 100 = 33,33%
roi = (5.000.000 / 10.000.000) x 100 = 50%
break_even = ceil(10.000.000 / 150.000) = 67 unit

Insight:

  • Business margin looks healthy

Example 2

Input:

  • cost per product: Rp 100,000
  • selling price: Rp 90,000
  • quantity sold: 100

Result:

profit_per_produk = 90.000 - 100.000 = -10.000
total_modal = 100.000 x 100 = 10.000.000
estimasi_omzet = 90.000 x 100 = 9.000.000
keuntungan_total = -10.000 x 100 = -1.000.000
margin = (-10.000 / 90.000) x 100 = -11,11%
roi = (-1.000.000 / 10.000.000) x 100 = -10%
break_even = Not Possible

Insight:

  • Selling price is still below cost

Example 3

Input:

  • cost per product: Rp 100,000
  • selling price: Rp 15,000,000
  • quantity sold: 100

Result:

profit_per_produk = 15.000.000 - 100.000 = 14.900.000
total_modal = 100.000 x 100 = 10.000.000
estimasi_omzet = 15.000.000 x 100 = 1.500.000.000
keuntungan_total = 14.900.000 x 100 = 1.490.000.000
margin = (14.900.000 / 15.000.000) x 100 = 99,33%
roi = (1.490.000.000 / 10.000.000) x 100 = 14.900%
break_even = 1 unit

Insight:

  • Margin very high, recheck selling price

Limitations of the Current Version

This calculation does not yet include other business variables such as:

  • operational cost
  • labor cost
  • sales discount
  • returns / damaged goods
  • MDR
  • daily service fee
  • tax

Therefore, the Total Profit, Margin, and ROI results in the current version are still basic simulations, not the final net profit.

If the calculator is to be closer to real business conditions, the next version should add:

  • Period operational cost
  • MDR / transaction deduction
  • Discount / promo
  • Return percentage
  • Daily service fee
  • Monthly fixed cost

This way, the final result can be broken down into:

  • Gross profit
  • Operating profit
  • Net profit
  • Break Even based on fixed cost