Photo by 2H Media on Unsplash
What this guide covers and what it excludes
This guide teaches you to build a fully working manufacturing cost per unit calculator in Google Sheets using the GSheetPress GS2Web add-on. The model covers seven cost components: direct materials, direct labour, machine time, setup cost, scrap allowance, variable overhead (combined with labour for input efficiency), and fixed overhead allocation. It produces two key outputs — total batch cost and cost per good unit — for a single production run.
What is excluded: multi-product joint-cost allocation, work-in-progress (WIP) valuation, depreciation schedules, payroll tax calculations, and currency conversion. All cost rates and overhead rates must be sourced from your own accounting records or verified with a qualified cost accountant. This guide produces a planning model, not an audited financial statement.
Key terms explained
- Direct materials: Raw materials or components that become part of the finished product and can be traced directly to each unit.
- Direct labour: Wages paid to workers who physically manufacture the product, expressed in this model as a total batch cost (rate multiplied by hours, calculated before you open the spreadsheet).
- Machine time cost: The cost of running production machinery for the batch — machine hourly rate multiplied by machine hours run.
- Setup cost: A one-off cost incurred each time a production run is configured, such as changing moulds or calibrating equipment. It is fixed per batch regardless of how many units are produced.
- Scrap allowance: An estimate, expressed as a whole-number percentage of total material cost, for material wasted or rejected during production. Enter 5 to mean 5 percent; the formula divides by 100.
- Variable overhead: Indirect costs that increase proportionally with output, such as consumables and production utilities. In this seven-input model these are combined with direct labour into a single input.
- Fixed overhead: Indirect costs that do not change with volume in the short term, such as factory rent and supervisor salaries. A pre-calculated portion is allocated to each batch.
- Overhead allocation rate: The fixed overhead amount assigned to this specific batch, derived outside this model from budgeted fixed overhead divided by budgeted activity. You enter the resulting dollar amount for the batch.
- Batch size: The total number of units started in a production run. Good units produced equals batch size minus expected rejects; in this model the simplification is that you enter only good units intended, and scrap material cost is added separately.
- Cost per unit: Total batch cost divided by the number of good units produced. This is the primary output of the model.
- Volume effect: Because setup cost and allocated fixed overhead are fixed per batch, spreading them over more units lowers the per-unit contribution of those fixed costs. The calculator lets you observe this by changing batch size.
- Column E (Default): Holds the values displayed on the web form before a user submits anything. These are your worked-example defaults.
- Column G (Inputs): Holds the current calculation values submitted from the web form. Write all result formulas referencing G cells. The form overwrites G on every submission, so never store formulas there.
Prerequisites
- A Google account with access to Google Sheets.
- GSheetPress GS2Web add-on installed in your Google account. Install it from the Google Workspace Marketplace and confirm it appears under Extensions in Sheets.
- A GSheetPress account registered to the same email address as your Google account, with a plan that includes the Calculator feature. Review plan options on the GSheetPress pricing page.
- A dedicated sample workbook created specifically for this calculator. Do not use a workbook containing private or sensitive business data, because the sharing step later makes the spreadsheet editable by anyone who holds the link.
- Source figures for your cost rates: material cost per unit, total direct labour cost for the batch, total machine cost for the batch, setup cost, scrap percentage, and fixed overhead allocated to the batch. Confirm these with your accounts team before entering them.
Understand the cost formula before building
The model calculates two outputs. First, total batch cost:
Total batch cost =
(Material cost per unit x Batch size)
+ Total direct labour cost
+ Total machine cost
+ Setup cost
+ (Material cost per unit x Batch size x Scrap% / 100)
+ Fixed overhead allocationSecond, cost per unit:
Cost per unit = Total batch cost / Good units (batch size)Variable vs fixed costs: Materials, labour, machine time, and scrap scale with volume and are therefore variable. Setup cost and fixed overhead allocation are fixed per batch — doubling batch size roughly halves their per-unit contribution. Use the calculator to test different batch sizes and observe this volume effect directly. For a deeper look at structuring spreadsheet calculations, see the GSheetPress calculator feature overview.
Build the manufacturing cost calculator
Step 1 — Create a dedicated sample workbook
- Go to Google Sheets and create a new blank spreadsheet.
- Name it Manufacturing Cost Calculator – Sample.
- Rename the default tab ManufCost by double-clicking the tab name.
- Leave all cells empty. The add-on generates the template structure in the next step.
Step 2 — Create the calculator via the add-on
- With the ManufCost tab selected, click Extensions in the Google Sheets menu bar.
- Click GS2Web SaaS (or the name shown for your installed GSheetPress add-on).
- Click Calculator, then New Calculator.
- In the dialog, enter a name such as Mfg Cost Per Unit.
- Set the number of inputs to 7. Do not count the Calculate button as an input.
- Choose whether to include a graph. For this model, graphs are optional — the key outputs are numeric. Select No graph to keep the layout simple.
- Click Create. The add-on fills row 1 with generated column headers across columns A through H and creates the input rows, button row, separator row, and result heading row automatically.
Step 3 — Understand the generated layout
Row 1 contains these generated headers. Do not edit them.
| Column | Header generated |
|---|---|
| A | Labels |
| B | Input Type |
| C | Required |
| D | Data |
| E | Default |
| F | ToolTips (some templates spell this ToopTips — use whatever appears) |
| G | Inputs |
| H | Rules |
Because you chose 7 inputs, the row structure is fixed as follows:
| Row | Purpose |
|---|---|
| 2–8 | Input rows (one per input) |
| 9 | Calculate button (generated automatically) |
| 10 | Merged Result Fields separator (generated automatically) |
| 11 | Result column headings (you add labels here) |
| 12 onward | Result rows (you enter formulas here) |
E versus G — important: Column E holds default values shown on the web form before submission. Column G holds live values submitted by the user. Write every result formula referencing G2:G8. To test formulas before publishing, copy E2:E8, then paste using Paste special → Values only into G2:G8. The web form overwrites G2:G8 on each submission, so never store result formulas in column G.
Step 4 — Configure input row 2: Material cost per unit
- A2 — Label: Material Cost per Unit ($)
- B2 — Input Type: Number
- C2 — Required: Click the checkbox to tick it (mandatory field)
- D2 — Data: Leave blank
- E2 — Default: 12.50
- F2 — ToolTips: Enter the direct material cost for one unit before scrap.
- H2 — Rules: Leave blank
Step 5 — Configure input row 3: Batch size
- A3 — Label: Batch Size (units)
- B3 — Input Type: Number
- C3 — Required: Click the checkbox to tick it
- D3 — Data: Leave blank
- E3 — Default: 500
- F3 — ToolTips: Number of units started in this production run.
- H3 — Rules: Leave blank
Step 6 — Configure input row 4: Total direct labour cost
- A4 — Label: Total Direct Labour Cost ($)
- B4 — Input Type: Number
- C4 — Required: Click the checkbox to tick it
- D4 — Data: Leave blank
- E4 — Default: 800
- F4 — ToolTips: Labour rate multiplied by labour hours for the whole batch. Include variable overhead if applicable.
- H4 — Rules: Leave blank
Step 7 — Configure input row 5: Total machine cost
- A5 — Label: Total Machine Cost ($)
- B5 — Input Type: Number
- C5 — Required: Click the checkbox to tick it
- D5 — Data: Leave blank
- E5 — Default: 350
- F5 — ToolTips: Machine hourly rate multiplied by machine hours for the batch.
- H5 — Rules: Leave blank
Step 8 — Configure input row 6: Setup cost
- A6 — Label: Setup Cost ($)
- B6 — Input Type: Number
- C6 — Required: Click the checkbox to tick it
- D6 — Data: Leave blank
- E6 — Default: 200
- F6 — ToolTips: One-off cost to configure this production run. Fixed regardless of batch size.
- H6 — Rules: Leave blank
Step 9 — Configure input row 7: Scrap allowance percentage
- A7 — Label: Scrap Allowance (% of material cost)
- B7 — Input Type: Number
- C7 — Required: Click the checkbox to tick it
- D7 — Data: Leave blank
- E7 — Default: 5
- F7 — ToolTips: Enter as a whole number. Enter 5 to mean 5 percent. Enter 0 for no scrap. Do not enter 0.05.
- H7 — Rules: Leave blank
Step 10 — Configure input row 8: Fixed overhead allocation
- A8 — Label: Fixed Overhead Allocation ($)
- B8 — Input Type: Number
- C8 — Required: Click the checkbox to tick it
- D8 — Data: Leave blank
- E8 — Default: 600
- F8 — ToolTips: Pre-calculated fixed overhead amount allocated to this batch from your overhead absorption rate.
- H8 — Rules: Leave blank
Step 11 — Verify the generated button row (row 9)
Row 9 is created automatically as the Calculate button. Check it contains the following values and do not change them:
- A9 — Label: Calculate
- B9 — Input Type: Button
- D9 — Data: main
- E9: Reset
Do not add another button row or delete this row. The word Reset in E9 is the generated label for the reset button on the web form; it is separate from the Calculate label in A9.
Step 12 — Add result column headings in row 11
- Click cell A11. Type
Resultand press Tab. - Click cell B11. Type
Valueand press Enter.
Row 10 is the merged Result Fields separator generated by the add-on. Leave it as is.
Step 13 — Enter result labels and formulas from row 12
For each pair below, click the label cell and type the text, then click the formula cell, type only the equals sign to start, paste the remainder of the formula, and press Enter.
Row 12 — Total material cost
- Click A12. Type:
Total Material Cost ($) - Click B12. Click in the formula bar, type the following formula exactly, and press Enter:
=G2*G3This multiplies material cost per unit (G2) by batch size (G3).
Row 13 — Scrap cost
- Click A13. Type:
Scrap Cost ($) - Click B13 and enter:
=G2*G3*(G7/100)G7 holds the whole-number scrap percentage. Dividing by 100 converts it to a decimal before multiplying by total material cost.
Row 14 — Total batch cost
- Click A14. Type:
Total Batch Cost ($) - Click B14 and enter:
=(G2*G3)+G4+G5+G6+(G2*G3*(G7/100))+G8This sums all cost components: materials (G2 times G3), direct labour (G4), machine cost (G5), setup (G6), scrap allowance, and fixed overhead allocation (G8).
Row 15 — Cost per unit
- Click A15. Type:
Cost per Unit ($) - Click B15 and enter:
=IF(G3=0,"Batch size cannot be zero",B14/G3)The IF check prevents a division-by-zero error if batch size is not yet entered. It references B14 (the total batch cost result) divided by G3 (batch size from the form).
Row 16 — Fixed cost per unit (volume effect illustration)
- Click A16. Type:
Fixed Cost per Unit ($) - Click B16 and enter:
=IF(G3=0,"Enter batch size",(G6+G8)/G3)This shows only the setup and fixed overhead cost spread per unit, making the volume effect visible. As G3 increases, this value falls.
Step 14 — Test formulas before publishing
- Select cells E2:E8.
- Press Ctrl+C (or Cmd+C on Mac) to copy.
- Click cell G2.
- Right-click and choose Paste special → Values only. This pastes the default values into the G column without overwriting any formulas.
- Check that the result cells B12:B16 display the numbers shown in the worked example below.
Worked example with the default inputs
Using the default values entered in column E (and copied to G for testing), the results should be:
| Input | Default value |
|---|---|
| Material cost per unit | $12.50 |
| Batch size | 500 units |
| Total direct labour cost | $800 |
| Total machine cost | $350 |
| Setup cost | $200 |
| Scrap allowance | 5% |
| Fixed overhead allocation | $600 |
Calculation trace:
- Total material cost: 12.50 x 500 = $6,250
- Scrap cost: 6,250 x 0.05 = $312.50
- Total batch cost: 6,250 + 800 + 350 + 200 + 312.50 + 600 = $8,512.50
- Cost per unit: 8,512.50 / 500 = $17.025 per unit
- Fixed cost per unit: (200 + 600) / 500 = $1.60 per unit
Your result cells should display these values. If any differ, check that G2:G8 contain the pasted default values and that your formulas reference G cells, not E cells.
Alternative scenario — volume effect: Change G3 to 1,000 (double the batch). Total material cost becomes $12,500, scrap becomes $625, and total batch cost becomes approximately $14,937.50. Cost per unit falls to roughly $14.94 because the $200 setup and $600 fixed overhead are now spread over 1,000 units instead of 500. Fixed cost per unit drops from $1.60 to $0.80 — exactly half, demonstrating the volume effect.
Troubleshooting
Results show zeros or errors after pasting defaults
- Confirm you used Paste special → Values only. A regular paste may overwrite G cells with formulas rather than numbers.
- Check that formulas in B12:B16 begin with an equals sign. If the cell displays the formula as text, click the cell, press F2, and confirm the first character is =.
- Ensure G2:G8 contain numbers, not text. If a cell shows a number left-aligned, it may be stored as text. Clear it and retype the value.
Cost per unit shows the error message instead of a number
The formula in B15 returns the error message text when G3 is zero or empty. Paste the default value 500 into G3 using Paste special → Values only and the result will appear.
Scrap cost seems too high or too low
Check that G7 contains a whole number such as 5, not a decimal such as 0.05. The formula divides G7 by 100 internally. Entering 0.05 would produce a scrap percentage of 0.05 percent, not 5 percent.
Deducting reject units from the denominator
The default model assumes all started units are good units. If your process consistently rejects a known percentage of units, subtract expected rejects from batch size before entering the batch size figure. Alternatively, replace G3 in the cost-per-unit formula with G3*(1-(RejectRate/100)) where RejectRate is an additional input you add as an eighth input row, adjusting all row numbers from 9 onward accordingly.
Fixed overhead allocation figure is unclear
This model requires you to enter the pre-calculated overhead amount for the batch. To derive it, divide your total budgeted fixed overhead for the period by the budgeted number of batches (or by budgeted machine hours if using an hours-based rate), then multiply by the batches (or hours) for this run. Consult your management accountant for the correct basis. For more on structuring calculation inputs, visit the GSheetPress calculator details page.
The add-on menu does not appear
Ensure the GS2Web add-on is installed under the same Google account you are currently signed into. Close and reopen Sheets. If Extensions shows the add-on name but the submenu does not load, try refreshing the browser or clearing cached add-on data from Extensions → Manage add-ons.
Frequently asked questions
Can I add more cost components, such as packaging or freight?
Yes. When creating the calculator, set the input count higher — for example 9 to add packaging cost and outbound freight as two additional inputs. The add-on adds extra input rows automatically. Update your total batch cost formula in B14 to include the new G cells. All row numbers for the button, separator, headings, and results shift down by the number of extra inputs you add, so plan your input list before creating the calculator. For guidance on building more complex calculators, see the GSheetPress calculator feature overview.
Why does lowering batch size increase cost per unit?
Setup cost and fixed overhead allocation are fixed amounts per batch — they do not change when you produce fewer units. Spreading those fixed amounts over fewer units increases their per-unit share. This is the volume effect. Variable costs such as materials and labour also decrease in total when batch size falls, but fixed costs do not, so the per-unit average rises. The Fixed Cost per Unit row in B16 makes this visible directly.
How do I share the published calculator with colleagues without letting them edit my spreadsheet?
The GSheetPress publish step requires your spreadsheet to be shared as editable by anyone with the link. This is a platform requirement for the add-on to read live submission data. Because of this, only use a dedicated sample workbook containing no sensitive data. Your colleagues interact with the published web calculator link, not the spreadsheet itself — they never need to open the spreadsheet. Keep the spreadsheet link private and only distribute the public calculator link produced in the publish step below. For further guidance, visit GSheetPress support.
Publish and test your web calculator
Step 1 — Share the sample workbook correctly
- In the sample workbook, click Share in the top-right corner.
- Under General access, change the setting to Anyone with the link.
- Set the role to Editor.
- Click Done.
Important: This setting permits anyone who obtains the spreadsheet URL to edit it. Use only the dedicated sample workbook for this reason. Never share the spreadsheet link publicly — only share the calculator link generated in the step below.
Step 2 — Publish the calculator
- Confirm the ManufCost tab is selected.
- Click Extensions → GS2Web SaaS → Calculator → Publish Calculator.
- Wait for the confirmation message. The add-on creates or updates a Calculators sheet in your workbook listing your published calculators.
Step 3 — Retrieve the public link
- Open the Calculators sheet (created or updated by the add-on).
- Find the row where the Sheet Name column matches ManufCost.
- Open the link in column C (the public Link). Do not use the link in column B (Edit Link), which opens the add-on editor.
- If the row does not appear or the link is stale, click Get Links inside the add-on to refresh the Calculators sheet.
Step 4 — Test the published calculator
- Open the public link in a new browser tab.
- Enter the default values from the worked example: material cost per unit 12.50, batch size 500, labour cost 800, machine cost 350, setup cost 200, scrap 5, fixed overhead 600.
- Click Calculate.
- Confirm the results match: total material cost $6,250, scrap cost $312.50, total batch cost $8,512.50, cost per unit $17.025, fixed cost per unit $1.60.
- If any result differs, return to the spreadsheet and check that the formulas in B12:B16 reference G2:G8 correctly and that no formula references E cells instead.
Step 5 — Embed the calculator on a website (optional)
- In the Calculators sheet, copy the content of column D (Iframe) for the ManufCost row.
- Paste the iframe HTML into an HTML block on your website or intranet page.
- Republishing the same calculator later (repeating Step 2) retains the same public link and iframe — you do not need to update the embed code.
For additional help with table layouts and presenting results on published pages, see the GSheetPress table feature details.