Automating quotes in a machine shop with Python and spreadsheets
Quote automation in a job shop works best as a spreadsheet the estimator already understands, backed by a small Python script that applies your rules: stock size and cost, setups, cycle time per operation, outside processes and margin, then fills your quote template. Keep every rule visible and editable, and let the estimator override any number.
Guilherme Rodrigues ItinoseUpdated 5 min read
Key takeaways
- Automate the arithmetic and the document, not the estimator's judgment.
- Keep rates, stock prices and setup rules in tables the estimator can edit.
- Start with the part families you quote most; leave exotic parts manual.
- Run the tool next to the old process until both give the same answers.
In a job shop, every RFQ repeats the same steps: read the drawing, pick stock, estimate setups and cycle time, add heat treatment or coating, apply margin, write the quote. The judgment is in the estimates. The time goes into the arithmetic and the document. That is the part worth automating.
What the estimator keeps, what the tool does
| Step | Estimator | Tool |
|---|---|---|
| Read the drawing, spot risks | ✓ | Can pre-fill title-block data |
| Choose process and operations | ✓ | Suggests from part family |
| Stock size and cost | Confirms | Picks from stock list and price table |
| Setups and cycle times | Adjusts | Applies rules per operation |
| Outside processes | Confirms | Uses last supplier prices |
| Margin and quantity breaks | Decides | Calculates |
| Quote PDF | Reviews | Generates from template |
The data tables
Put your rules in tables, not in code:
- Machines: hourly rate, setup rate.
- Stock: material, shape, size, price per kg or per metre, minimum cut length.
- Operations: setup time and time rules per operation type (face, turn, drill, mill pocket), by material group.
- Outside processes: supplier, price per piece or per kg, minimum charge, lead time.
- Margins: by customer type and quantity.
The estimator can change any value without touching code.
A small engine
The calculation itself is short. A simplified version:
from dataclasses import dataclass
@dataclass
class Operation:
machine_rate: float # per hour
setup_min: float # minutes per batch
cycle_min: float # minutes per part
def quote(qty, stock_cost_per_part, ops, outside_per_part, margin):
machining = sum(
op.machine_rate * (op.setup_min / qty + op.cycle_min) / 60 for op in ops
)
cost = stock_cost_per_part + machining + outside_per_part
return round(cost * (1 + margin), 2)
ops = [Operation(90, 45, 6.5), Operation(110, 60, 4.0)]
print(quote(qty=50, stock_cost_per_part=3.20, ops=ops, outside_per_part=1.10, margin=0.25))
The numbers above are placeholders. The value is that setups are spread over the batch automatically, and every term is visible.
Rolling it out without breaking quoting
- Pick one part family you quote often: turned shafts, flat plates, simple brackets.
- Collect twenty past quotes for that family, with what was actually charged.
- Calibrate the rules until the tool reproduces them within a range the estimator accepts.
- Run in parallel for a few weeks: the estimator quotes as usual and compares.
- Switch when they trust it, and keep the old way for parts outside the family.
Where AI helps
Language models are useful at the edges: pulling part number, material, quantity and due date out of an RFQ email or a PDF title block, or drafting the cover text of the quote. Keep them out of the price calculation, and always show the estimator what was extracted before it is used.
How do you estimate cycle time without a CAM program?
Most shops do not program CAM before quoting, and they should not. Cycle time at quote stage comes from rules the estimator already uses in their head, made explicit:
| Operation | Typical rule input | Example rule form |
|---|---|---|
| Turning | Length and diameter removed, material group | minutes = k × volume removed |
| Drilling | Number of holes, diameter, depth | minutes per hole by size band |
| Milling pockets | Volume removed, material group | minutes = k × volume / material factor |
| Deburr and inspect | Part size and tolerance class | fixed minutes per part band |
The constants come from your own history. Take finished jobs where you know the real times, fit the constants, and accept that the rule is an estimate the estimator can adjust. The goal is a consistent starting point, not a CAM-accurate number.
Handling quantity breaks
Customers ask for 10, 50 and 200 pieces in the same RFQ. The setup spreads differently in each case, stock may switch from cut pieces to bar feeding, and outside processes often have minimum charges. Compute each quantity independently with the same rules, instead of applying a percentage discount. The quote then shows why the 200-piece price is lower, and the estimator can see when a minimum charge from the plating shop makes the 10-piece price jump.
Generating the quote document
The last step is the one that saves the most typing. Keep your existing quote template (Word, Excel or a PDF form), add placeholders for customer, part number, revision, quantities, prices, lead time and validity, and fill them from the engine. Two details make the document trustworthy:
- Revision and drawing reference printed on the quote, so a later revision triggers a requote instead of an argument.
- Assumptions block listing material, tolerance class, finish and what is excluded. Most disputes after a quote are about assumptions nobody wrote down.
Keeping it maintainable
A quoting tool that only its author understands becomes a risk. Keep it boring: rules in tables, a short README, one function per cost element, and a test file with five or six past quotes that must still produce the same prices after any change. When someone updates machine rates, the tests show which quotes moved and by how much.
What not to automate
Leave manual the parts that need judgment every time: unusual materials, five-axis work, assemblies, anything with a new customer requirement. Mark them in the tool as “manual quote” instead of forcing a formula. A tool that is right for most routine RFQs and honest about the rest is more useful than one that pretends to cover everything.
What it is worth
The gain is consistency as much as speed: two estimators quoting the same part get the same base price, and every quote can be explained line by line.
When to outsource this
- Your estimator spends more time typing than estimating
- Quotes for the same part differ depending on who prepared them
When not to
- You quote a handful of complex jobs a month; the manual process is fine
- Your ERP already has a quoting module you have not configured yet
FAQ
Why not an AI that quotes from the drawing?
AI can help read title blocks, materials and quantities from PDFs and emails. The price itself should come from explicit rules your estimator can check, because a wrong quote is a commercial commitment.
Spreadsheet or web app?
Start in the spreadsheet your team uses. Move to a web form when several people quote at once or the data needs to flow into an ERP.
Send us one drawing
We return a review with issues found, suggested fixes and a fixed-price scope.