LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.
Methodology
Purpose and model boundary
This calculator plans how to cut up to 80 pieces from steel stock bars of up to five lengths, allowing for the saw kerf. It returns the bars used, each bar's pieces and where they start and end, the kerf loss, offcut and waste of each bar and in total, the utilization, the offcuts worth keeping and, when you give prices, the cost.
The plan follows one stated rule, first-fit decreasing. It is a fast, repeatable rule of thumb, not a proven optimum: another plan may use less stock or cost less. The plan is not a fabrication drawing, a shop instruction, a purchase quantity or a structural check.
The spreadsheet is the calculation authority. The page sends the cut list and the stock lengths you enter to the workbook and draws only the plan the workbook returns; it computes no plan and no total itself.
Inputs and units
- Units. US or Metric. Lengths are in feet (US) or metres (Metric); the kerf is in inches (US) or millimetres (Metric). The workbook never converts between the two systems; the page converts the values on screen when you switch.
- Cut list. Up to 20 rows: a mark, a length and a whole-number quantity for each kind of piece, and up to 80 pieces in all. Marks must be different (letter case is ignored).
- Stock lengths. Up to 5 rows: a length, the number of bars available (blank for as many as needed) and a cost per bar in USD (blank if unpriced).
- Kerf. The width of material each cut removes, from 0 to 1 in (25 mm).
- Keep offcuts at least this long. Optional. An offcut at least this long is kept as a remnant rather than counted as scrap. Blank counts every offcut as scrap.
Governing relationships
For each bar the workbook returns, the pieces, the kerf loss and the offcut add up to the bar's stock length:
stock length = length of the pieces + kerf loss + offcut
A cut removes the piece and one kerf, or whatever is left of the bar if that is less than a kerf, so a bar's last offcut can be 0. Waste is kerf loss plus offcut. Utilization is the length of the pieces cut over the length of stock used. Scrap is waste less the offcuts kept as remnants.
Calculation sequence
- The pieces are taken longest first; pieces of equal length are taken in cut-list row order.
- Each piece goes into the first bar already started that still has room. A piece fits when the length left on the bar is at least the piece's length, less 1e-9 ft (m).
- When no started bar has room, a new bar is started from the longest stock length that still has a bar available, the earlier row on a tie.
- The plan stops at 40 bars, or when the stock available runs out.
- Each bar's offcut is classed as a remnant (at least the threshold), scrap (shorter) or none (an offcut of 0), and the totals, utilization and costs follow.
Outputs and interpretation
- Bars used, utilization, waste and stock cost, with the stock length used, the length of the pieces, the kerf loss, the offcuts, the remnants and the scrap.
- Bars, in the order started: each bar's stock row and length, its pieces and their total length, its kerf loss, offcut and waste, whether the offcut is kept, its cost and its pattern of marks.
- By stock length and by cut mark: the bars used from each stock row, and how many of each mark were cut and not cut.
- The drawing shows each returned bar to scale with its pieces, labelled by mark, the kerf after each piece and the offcut shaded as kept or scrapped. Pieces that could not be cut are listed below it.
Costs are shown only when every bar used comes from a priced stock row; otherwise they are blank, never zero. The cost of the scrap is each bar's cost times its scrap over its length.
Validation and status logic
The status reads OK when every piece is cut. It reads CHECK when some pieces could not be cut, because the stock available is used up or the plan reached 40 bars: the plan shows the bars that were cut, and the pieces not cut are listed at the end. It reads NOT VALID, with the first input to fix, when an input is outside the ranges below or a piece is longer than every stock length; nothing is planned then.
Assumptions and limitations
- One stated rule of thumb (first-fit decreasing); the least stock or the lowest cost is not searched for.
- The kerf is the only allowance between pieces. End trims, squaring cuts, mill tolerances and damaged ends are not modelled: allow for them in the lengths you enter.
- Example prices in the worked examples are illustrative, not current prices.
- Measure and check before cutting.
Restrictions and non-computing states
- A cut length or a stock length must be above 0 and at most 120 ft (40 m).
- A quantity is a whole number; the cut list holds at most 80 pieces in all.
- The number available is a whole number, or blank for as many as needed.
- A cost is from 0 to 100,000 per bar, or blank.
- A mark is at most 32 characters, without * ? ~ < > =, and marks must differ (ignoring letter case).
- The kerf is from 0 to 1 in (25 mm); the remnant threshold is 0 or more, or blank.
- At least one piece and one stock length must be listed.
Errors and warnings
Each NOT VALID status names the first input to fix, for example the row whose mark repeats another, or the piece that is longer than every stock length. A CHECK status names how many pieces could not be cut, why, and the first of them.
References
The method is first-fit decreasing, a classical heuristic for the one-dimensional bin-packing and cutting-stock problems. The pieces are taken longest first, each goes into the first bar already started that still has room for it, and a new bar is started from the longest stock length still available when none has room. It is fast and repeatable but is not guaranteed to use the least stock or cost the least. The full method is stated on the workbook's Instructions and References sheets and in the Methodology above.
Sources and further reading
- The first-fit decreasing rule and its worst-case performance bounds for one-dimensional packing: D. S. Johnson, A. Demers, J. D. Ullman, M. R. Garey and R. L. Graham, "Worst-case performance bounds for simple one-dimensional packing algorithms", SIAM Journal on Computing 3(4), 1974, pages 299-325. doi:10.1137/0203025
- The tight worst-case bound of first-fit decreasing: G. Dósa, "The tight bound of first fit decreasing bin-packing algorithm is FFD(I) ≤ 11/9 OPT(I) + 6/9", in Combinatorics, Algorithms, Probabilistic and Experimental Methodologies, Lecture Notes in Computer Science, Springer, 2007, pages 1-11. doi:10.1007/978-3-540-74450-4_1
- The bin-packing problem and its approximation algorithms, in a general text on combinatorial optimization: B. Korte and J. Vygen, Combinatorial Optimization, 6th edition, Springer, 2018, chapter 18, Bin-Packing. doi:10.1007/978-3-662-56039-6
- The cutting-stock problem and its exact linear-programming formulation, for plans that use less stock than a heuristic: P. C. Gilmore and R. E. Gomory, "A linear programming approach to the cutting-stock problem", Operations Research 9(6), 1961, pages 849-859. doi:10.1287/opre.9.6.849
- The classification of cutting and packing problems, including one-dimensional cutting stock with several stock lengths: G. Wäscher, H. Haußner and H. Schumann, "An improved typology of cutting and packing problems", European Journal of Operational Research 183(3), 2007, pages 1109-1130. doi:10.1016/j.ejor.2005.12.047
No table, chart or text from any standard, manual or commercial publication is reproduced, and no price is built in. None of the authors or publishers named here has reviewed or endorses this calculator.
The workbook was checked by hand traces and by conservation (pieces, kerf loss and offcut adding up to each bar's stock length) on every case.
Found a problem, or have an idea?
Tell us if a result looks wrong, a label is unclear, or something is missing. We read every message.