{
  "name": "One shipment's cube and density, and the row of your own break table each handling unit lands in",
  "page": "https://otherworldlabs.com/freight-class-from-density/",
  "endpoint": "https://otherworldlabs.com/freight-class-from-density/api.json",
  "question": "For a shipment whose handling units the caller has already measured and weighed, and a density break table the caller types, what is the cube in cubic feet, what is the density in pounds per cubic foot for the shipment and for each row of handling units, which row of that table does each density land in, and how many pounds and cubic feet sit between the shipment and the nearest edge of its own row.",
  "answers": "one shipment at a time, of up to six rows of handling units sharing a footprint, read against a break table of three to twelve rows; the page keeps one shipment in the browser and nothing else.",
  "version": "2026-10-21",
  "licence": "The arithmetic is not ours to license. Reuse the formulas; the page is free and stores nothing.",
  "method": "static description plus a worked example; the same formulas run in the browser on the page above, pulled out of it by the script id 'core' and answered by FreightClassFromDensity.apiOutputs(state).",
  "zeros": "Every field below is a NUMBER. The page prints a dash, or \"not yet\", wherever a figure does not exist; this endpoint prints 0 there, because the dash is a matter of what may honestly be printed and not of what the arithmetic comes to. That makes 0 two things on a few fields - a reading, and the absence of a figure - and a caller may never be left to guess which: wherever a field's formula says \"0 is not a reading\", the formula also names the field in this same answer that tells the two apart. The companions, in one place: bandIndex is 0 only where the caller's table returned no row, and a position otherwise, which is what separates a distance DOWN of 0.0 pounds (a shipment sitting exactly on the floor of its own row, bandIndex above 1) from no floor below to be any distance from (bandIndex 1 or 0); bandHasCeiling is 1 only where the row the shipment landed in has a row above it, which does the same for both distances UP and for bandCeilingLb; bandFloorLb above zero is what makes the cubic feet down a proportion; unitsDifferingBandKnown is 1 only where every row carries a weight of its own and the lookup returned a row; weightsBothTyped is 1 only where every row the caller has started carries a weight above zero and its piece count and all three dimensions and a shipment total is typed, which is what makes a gap of 0 between two weights an agreement rather than a shipment whose started rows are still incomplete (corrected 2026-10-24, round 2, B1, D-184); and on the per-row fields 0 falls outside the control's own range, so it cannot be read as a figure at all - a piece count runs 1 to 99, a row that carries all three dimensions cubes to at least 0.001 cubic feet, a weighing is above zero, and a position counts from 1. The page's own render holds these absences as nothing internally and prints the dash off them, so the three artefacts - the page, this endpoint and the workbook sold beside it - carry one set of figures and one set of conditions, which is what lets them be compared cell by cell.",
  "currency": "none. No figure this endpoint returns is a money figure: there is no rate, no tariff, no cost, no quote, no discount, no accessorial and no money figure of any kind in this document or in the arithmetic it describes, and there must never be one. The page that carries this arithmetic sells two files beside it, a workbook and a short PDF of the rules, for one price, and prints that one price in its buy link; that price is the only money figure anywhere on the page, it is the price of those two files and not a figure about anybody's freight, and nothing here computes it. Corrected 2026-10-24 (round 2, B2): the kit has been two files throughout and this sentence said one.",
  "direction": "The calculation runs one way only: from dimensions, piece counts and weights the caller has already measured, and a break table the caller confirms with their carrier, to a cube, a density, a row of that table and the distances to that row's edges. Nothing here runs the other way: it will not tell you what to measure, what to declare, or what a class should be.",
  "authority": "This is not a carrier, a broker or a classification authority and it holds no tariff. The break table is the caller's: typed by them, or the eight demonstration rows the page ships labelled as a demonstration until the caller replaces them with the table their carrier confirms. No item number is presented as authoritative and no classification directory is reproduced. Nothing here says a class is correct, accepted, audit-proof or safe from reclassification, and nothing here says that what it prints satisfies a carrier, a broker, a customs officer or a regulation.",
  "rounding": {
    "counts": "whole where the control's step is whole: the piece count per row (1 to 99), the cartons inside (0 to 999), the row count (1 to 6), the table's row count (3 to 12) and every count of rows or handling units. Rounded by the same rule as every other figure.",
    "cubes": "cubic feet to 3 decimals, by rN(x, dp) = sign(x) * round(abs(x) * 10^dp) / 10^dp, which is half AWAY FROM ZERO in both directions: rN(0.0005, 3) is 0.001 and rN(-0.0005, 3) is -0.001. A negative half unit therefore goes away from zero and not to a signed nothing. No figure on this page can be negative, and the rule is stated at the negative half unit because the engine's own function is the one that would be asked.",
    "weights": "pounds to 1 decimal, by the same rN, which is the granularity the weight fields offer (step 0.1).",
    "densities": "pounds per cubic foot to 1 decimal, by the same rN. The density is rounded BEFORE the lookup reads it, so the row returned is the row the printed figure falls in, and the four distances to the band edges are read off that same printed figure. Read instead off the weight exactly as weighed, a distance to a floor can come out a hundredth negative where the printed density rounds up across that floor, and a distance that is negative is not a distance.",
    "chain": "every figure is rounded where it is defined and every figure built out of other figures is built out of the ROUNDED ones, so no printed line is worked from a longer number than the one printed beside it. A row's cube is rounded to 3 decimals before its density divides by it; the shipment's cube is the rounded row cubes added up and rounded again; the gap in density is rounded to 1 decimal before it multiplies the cube."
  },
  "clamping": "Every figure is brought inside the range the page's own control offers before anything is computed: the piece count to 1 to 99, the cartons to 0 to 999, the length to 1 to 636 inches, the width and the height to 1 to 120 inches, each weight to 0 to 45,000 pounds, each band floor to 0 to 60 pounds per cubic foot, the row count to 1 to 6 and the table's row count to 3 to 12. A dimension, a piece count or a weight that is empty, or that reads zero or less, is not a measurement and the row that wants it is not complete; a band floor that is empty is not a floor, while a band floor that reads zero IS a floor, because a table's lowest band commonly begins at nothing.",
  "lookup": "The row read is the last row of the caller's table, in the order the rows were typed, whose floor is at or below the density. That has one answer only while the floors climb strictly, so a table whose floors do not climb is read as no table at all and the page names the row that broke the order rather than reaching for the nearest floor. A row with no floor, or with no label, is not a row of a table. Where no row is at or below the density, the lookup returns nothing and the page says so: the caller's table does not cover their own shipment. This endpoint reports that as bandIndex 0, which is never a position: see `zeros`.",
  "inputs": [
    {
      "name": "unitCount",
      "type": "number",
      "unit": "rows",
      "required": false,
      "range": "1 to 6, step 1, default 1",
      "note": "How many rows of handling units are on this shipment. One row is one group of pieces sharing a footprint on the one bill of lading. A caller who sends rows and no count gets as many rows as they sent, to a maximum of 6."
    },
    {
      "name": "units[].label",
      "type": "text",
      "unit": "words",
      "required": false,
      "range": "up to 48 characters; blank allowed",
      "note": "The shipper's own words for the row. Blank is allowed and the row is then named by its number."
    },
    {
      "name": "units[].packaging",
      "type": "text",
      "unit": "words",
      "required": false,
      "range": "up to 24 characters; blank allowed",
      "note": "Whatever the shipper puts in the packaging column: Pallet, Crate, Loose carton. It goes on the assembled document line and enters no arithmetic."
    },
    {
      "name": "units[].pieces",
      "type": "number",
      "unit": "handling units",
      "required": true,
      "range": "1 to 99, step 1",
      "note": "How many pallets, crates or loose pieces in this row carry these same dimensions, off the packing list. The row's cube is that count times the three dimensions; the row's density is unchanged by the count, because the pieces share a footprint and the count divides out."
    },
    {
      "name": "units[].lengthIn",
      "type": "number",
      "unit": "inches",
      "required": true,
      "range": "1 to 636, step 0.25",
      "note": "The shipper's tape, at the widest point with overhang included."
    },
    {
      "name": "units[].widthIn",
      "type": "number",
      "unit": "inches",
      "required": true,
      "range": "1 to 120, step 0.25",
      "note": "The same tape, at the widest point with overhang included."
    },
    {
      "name": "units[].heightIn",
      "type": "number",
      "unit": "inches",
      "required": true,
      "range": "1 to 120, step 0.25",
      "note": "Floor to the top of the load, with the pallet included."
    },
    {
      "name": "units[].cartons",
      "type": "number",
      "unit": "cartons",
      "required": false,
      "range": "0 to 999, step 1",
      "note": "The cartons inside this row, off the packing list. It feeds the assembled document line only, never the arithmetic."
    },
    {
      "name": "units[].weightLb",
      "type": "number",
      "unit": "pounds",
      "required": false,
      "range": "0 to 45000, step 0.1; blank allowed",
      "note": "The shipper's pallet scale or the scale ticket for the pieces in this row, weighed whole. Blank is a legitimate entry when a shipment total is typed instead, and the row's own density is then a dash rather than a guess."
    },
    {
      "name": "shipmentWeightLb",
      "type": "number",
      "unit": "pounds",
      "required": false,
      "range": "0 to 45000, step 0.1; blank allowed",
      "note": "The one scale ticket, dock-scale reading or carrier weight for the whole shipment, which is the only weight an operator who never weighed a pallet separately holds. Where both this and a weight on every row are typed and they disagree by more than a tenth of a pound, both are reported, the difference is named and the sum of the rows is used."
    },
    {
      "name": "bandCount",
      "type": "number",
      "unit": "rows",
      "required": false,
      "range": "3 to 12, step 1, default 8",
      "note": "How many rows the caller's own break table has. A caller who sends rows and no count gets as many rows as they sent, to a maximum of 12."
    },
    {
      "name": "bands[].floorLb",
      "type": "number",
      "unit": "pounds per cubic foot",
      "required": true,
      "range": "0 to 60, step 0.1",
      "note": "The lower edge of the band, off the table the caller's carrier confirms. Zero is a floor; empty is not. The floors must climb strictly, lowest first."
    },
    {
      "name": "bands[].classLabel",
      "type": "text",
      "unit": "words",
      "required": true,
      "range": "up to 24 characters",
      "note": "The label that carrier's table puts against that band, typed exactly as the table prints it. No item number from any published directory is supplied here or reproduced anywhere in this document."
    },
    {
      "name": "shipDate",
      "type": "text",
      "unit": "words",
      "required": false,
      "range": "up to 24 characters; blank allowed",
      "note": "The date the shipper is declaring on the bill of lading, in the shipper's own words. It is printed and never parsed, and it enters no arithmetic."
    }
  ],
  "outputs": [
    {
      "name": "rowsOnShipment",
      "unit": "pounds: none; a count of rows",
      "formula": "the row count as typed, held to 1 to 6 and rounded whole; where no count is given it is as many rows as the caller sends, to a maximum of 6"
    },
    {
      "name": "rowsStarted",
      "unit": "rows",
      "formula": "the rows carrying anything at all: your own words for the row, a packaging word, a dimension above zero, a carton count above zero or a weight above zero"
    },
    {
      "name": "rowsDimsComplete",
      "unit": "rows",
      "formula": "the rows carrying a piece count of at least 1 and all three dimensions above zero. A row is counted into the shipment only once it is one of these"
    },
    {
      "name": "handlingUnits",
      "unit": "handling units",
      "formula": "the piece counts of the rows counted into the shipment, which is rowsDimsComplete's own reading of a row, a piece count of at least 1 and all three dimensions above zero, added up. This, and not the number of rows, is the handling-unit count on the assembled document line. 0 while no row carries its piece count and all three dimensions. Reworded 2026-10-24 (round 2, M5) so that this field and rowsDimsComplete read a row the same way"
    },
    {
      "name": "cartonsTotal",
      "unit": "cartons",
      "formula": "the cartons inside the rows counted into the shipment, which is rowsDimsComplete's own reading of a row, a piece count of at least 1 and all three dimensions above zero, added up. It goes on the assembled document line and enters no cube, no density and no lookup. 0 while no row carries its piece count and all three dimensions. Reworded 2026-10-24 (round 2, M5) so that this field and rowsDimsComplete read a row the same way"
    },
    {
      "name": "bandsOnTable",
      "unit": "rows",
      "formula": "the row count of the caller's own break table as typed, held to 3 to 12 and rounded whole; where no count is given it is as many rows as the caller sends, to a maximum of 12"
    },
    {
      "name": "tableUsable",
      "unit": "1 or 0",
      "formula": "1 when every row of the caller's table carries a floor and a label and the floors climb strictly, and 0 otherwise. A table whose floors do not climb is read as no table at all, because the lookup would have more than one answer"
    },
    {
      "name": "totalCubeFt3",
      "unit": "cubic feet",
      "formula": "the cubes of the rows that carry all three dimensions, added up and rounded to 3 decimals, each row's cube being its pieces times its length times its width times its height over 1728 and itself rounded to 3 decimals first. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "totalWeightLb",
      "unit": "pounds",
      "formula": "the row weights added up and rounded to 1 decimal when every started row carries a weight above zero and every started row carries all three dimensions, and otherwise the shipment total weight as typed. A typed total is never split back across the rows by cube. 0 while the shipment carries no weight the lookup can read"
    },
    {
      "name": "weightFromRows",
      "unit": "1 or 0",
      "formula": "1 when the weight above is the row weights added up, and 0 otherwise. 0 while the shipment carries no weight the lookup can read. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "weightFromTotal",
      "unit": "1 or 0",
      "formula": "1 when the weight above is the shipment total as typed, and 0 otherwise. 0 while the shipment carries no weight the lookup can read"
    },
    {
      "name": "weightGapLb",
      "unit": "pounds",
      "formula": "where a weight on every started row and a shipment total are both typed, the difference between them in pounds, rounded to 1 decimal and never negative. 0 where the two are not both read, and 0 is not a reading there, because weightsBothTyped beside it is 1 only where every started row carries a weight above zero and its piece count and all three dimensions and a shipment total is typed. A gap of 0 with weightsBothTyped 0 is therefore a shipment whose two weights were never both read, either because one of them was never typed or because a row the caller started still wants its piece count or a dimension. Over a tenth of a pound the page prints both figures and names this difference, and uses the sum of the rows. 0 while the shipment carries no weight the lookup can read. 0 while no row carries its piece count and all three dimensions. Corrected 2026-10-24 (round 2, B1, D-184)"
    },
    {
      "name": "weightsBothTyped",
      "unit": "1 or 0",
      "formula": "1 where every row the caller has started carries a weight above zero and its piece count and all three dimensions, the weights on those rows add up above zero, and a shipment total is typed. 0 otherwise, and that 0 includes every state in which a started row still wants its piece count or a dimension, so a weight on a row and a shipment total can both be typed and this flag still read 0 while that row is incomplete. It is the companion of weightGapLb, because a difference of 0 pounds between two weights means those two weights agree, and that may never be read off a shipment where this flag is 0. Corrected 2026-10-24 (round 2, B1, D-184). The engine at index.html line 570 computes exactly this and is unchanged by the correction"
    },
    {
      "name": "shipmentDensityLbFt3",
      "unit": "pounds per cubic foot",
      "formula": "the weight above over the cube above, rounded to 1 decimal. This is the figure the lookup reads, and the four distances to the band edges are read off it as printed. 0 while the shipment carries no weight the lookup can read. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "bandIndex",
      "unit": "the position of a row in the caller's own table",
      "formula": "the position, counting from 1, of the last row of the caller's table whose floor is at or below the density above, in the order the rows were typed. 0 where no row of that table is at or below the density, which is the caller's table saying nothing about this shipment, and 0 is not a reading: a position counts from 1, so 0 is always the absence of a row. Which absence it is can be read off this same answer - 0 with tableUsable 1 and shipmentDensityLbFt3 above zero is the caller's table not covering their own shipment, and 0 with waiting true for any other reason is the page still waiting on an entry. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "bandFloorLb",
      "unit": "pounds per cubic foot",
      "formula": "the floor of the row at the position above, as typed. 0 where that position is 0, and 0 is not a reading there: a floor of 0 is a floor a table commonly has, so bandIndex is what tells the two apart - 0 there is no row at all, and a position from 1 is a floor as typed, zero or not. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "bandCeilingLb",
      "unit": "pounds per cubic foot",
      "formula": "the floor of the next row of the caller's table, which is the upper edge of the row the shipment lands in. 0 where that row is the last one typed and has no upper edge, and 0 where no row was returned at all, and 0 is not a reading in either case: bandHasCeiling beside it is 1 only where there is an upper edge. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "bandHasCeiling",
      "unit": "1 or 0",
      "formula": "1 when the row the shipment lands in has a row above it in the caller's table, and 0 when it is the last row typed. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "marginLbToFloor",
      "unit": "pounds",
      "formula": "the density above less the floor above, rounded to 1 decimal, times the cube above, rounded to 1 decimal: the pounds between this shipment and the floor of its own row, at the cube as typed. 0 where the caller's table has no row below this one, and 0 is not a reading there. This is the one field where 0 is also a true reading - a shipment sitting exactly on the floor of its own row IS 0.0 pounds from it - and bandIndex is what separates them: above 1, the 0 is a distance; 1 or 0, and there is no floor below to be any distance from. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "marginFt3ToFloor",
      "unit": "cubic feet",
      "formula": "the cube above times that same gap in density over the floor above, rounded to 3 decimals: the cubic feet between this shipment and the floor of its own row, at the density as printed. 0 where the caller's table has no row below this one, and 0 where that floor is zero, and 0 is not a reading in either case: bandIndex above 1 and bandFloorLb above zero together are what make this figure a distance. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "marginLbToCeiling",
      "unit": "pounds",
      "formula": "the ceiling above less the density above, rounded to 1 decimal, times the cube above, rounded to 1 decimal: the pounds between this shipment and the floor of the row above it, at the cube as typed. 0 where that row has no upper edge, and 0 is not a reading there: bandHasCeiling beside it is 1 only where there is one. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "marginFt3ToCeiling",
      "unit": "cubic feet",
      "formula": "the cube above times that same gap in density over the ceiling above, rounded to 3 decimals: the cubic feet between this shipment and the floor of the row above it, at the density as printed. 0 where that row has no upper edge, and 0 is not a reading there: bandHasCeiling and bandCeilingLb beside it are what make this figure a proportion. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "unitsDifferingBand",
      "unit": "handling units",
      "formula": "the piece counts of the rows whose own density reads a different position in the caller's table than the shipment does, added up. 0 where the weight is a shipment total and no row carries a weight of its own, and 0 where no row of the table was returned, and 0 is not a reading in either case: zero would assert an agreement that cannot be known without a weight on each row, and unitsDifferingBandKnown beside it is 1 only where every row carries a weight of its own and the lookup returned a row. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "unitsDifferingBandKnown",
      "unit": "1 or 0",
      "formula": "1 when the count above is known, which is when every row carries a weight of its own and the lookup returned a row, and 0 when the page prints a dash instead. 0 while the shipment carries no weight the lookup can read. 0 while the reader's table is not a table. 0 while no row carries its piece count and all three dimensions"
    },
    {
      "name": "waiting",
      "unit": "true or false",
      "formula": "true while the page may print no band, no shipment density and no headline figure: while a started row wants its piece count or a dimension, while no row is complete, while the shipment carries no weight above zero by either route, while the caller's table is not a table, or while that table has no row at or below the density"
    },
    {
      "name": "piecesRow1",
      "unit": "handling units",
      "formula": "the piece count of row 1 as typed, held to 1 to 99 and rounded whole. 0 where row 1 is blank, 0 where no piece count is typed on it, and 0 where it is not on the shipment; 0 is not a reading, because the control's own range starts at 1 and no row ever has a piece count of 0. A blank row is one carrying none of these: the caller's own words for it, a packaging word, a dimension above zero, a carton count above zero, a weight above zero. A piece count alone does not start a row, because the control ships at 1 and a row nobody has touched would otherwise report one handling unit on a shipment that has none"
    },
    {
      "name": "cubeFt3Row1",
      "unit": "cubic feet",
      "formula": "the cube of row 1: its pieces times its length times its width times its height over 1728, rounded to 3 decimals. 0 where the row does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because every dimension is at least 1 inch, so a row that carries all three cubes to at least 0.001 cubic feet"
    },
    {
      "name": "weightLbRow1",
      "unit": "pounds",
      "formula": "the weight of row 1 as weighed, rounded to 1 decimal. 0 where the row has no weight typed, 0 where it does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because a weight that reads zero is not a weighing - see `clamping`"
    },
    {
      "name": "densityRow1",
      "unit": "pounds per cubic foot",
      "formula": "the weight of row 1 over its own cube, rounded to 1 decimal, which is also each piece's own density in that row because the pieces of a row share a footprint. 0 where the row has no weight of its own and 0 where it is not on the shipment, and 0 is not a reading there: weightLbRow1 and cubeFt3Row1 beside it are what make this figure a density, and where both are above zero a printed 0.0 is a density that rounds to nothing at one decimal rather than an absence. A shipment total is never split back across the rows by cube to make one"
    },
    {
      "name": "bandIndexRow1",
      "unit": "the position of a row in the caller's own table",
      "formula": "the position in the caller's table that row 1's own density reads, by the same rule as the shipment's. 0 where that row has no density of its own, 0 where the caller's table is not a table, 0 where no row of it is at or below that density, and 0 where row 1 is not on the shipment; 0 is not a reading, because a position counts from 1"
    },
    {
      "name": "piecesRow2",
      "unit": "handling units",
      "formula": "the piece count of row 2 as typed, held to 1 to 99 and rounded whole. 0 where row 2 is blank, 0 where no piece count is typed on it, and 0 where it is not on the shipment; 0 is not a reading, because the control's own range starts at 1 and no row ever has a piece count of 0. A blank row is one carrying none of these: the caller's own words for it, a packaging word, a dimension above zero, a carton count above zero, a weight above zero. A piece count alone does not start a row, because the control ships at 1 and a row nobody has touched would otherwise report one handling unit on a shipment that has none"
    },
    {
      "name": "cubeFt3Row2",
      "unit": "cubic feet",
      "formula": "the cube of row 2: its pieces times its length times its width times its height over 1728, rounded to 3 decimals. 0 where the row does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because every dimension is at least 1 inch, so a row that carries all three cubes to at least 0.001 cubic feet"
    },
    {
      "name": "weightLbRow2",
      "unit": "pounds",
      "formula": "the weight of row 2 as weighed, rounded to 1 decimal. 0 where the row has no weight typed, 0 where it does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because a weight that reads zero is not a weighing - see `clamping`"
    },
    {
      "name": "densityRow2",
      "unit": "pounds per cubic foot",
      "formula": "the weight of row 2 over its own cube, rounded to 1 decimal, which is also each piece's own density in that row because the pieces of a row share a footprint. 0 where the row has no weight of its own and 0 where it is not on the shipment, and 0 is not a reading there: weightLbRow2 and cubeFt3Row2 beside it are what make this figure a density, and where both are above zero a printed 0.0 is a density that rounds to nothing at one decimal rather than an absence. A shipment total is never split back across the rows by cube to make one"
    },
    {
      "name": "bandIndexRow2",
      "unit": "the position of a row in the caller's own table",
      "formula": "the position in the caller's table that row 2's own density reads, by the same rule as the shipment's. 0 where that row has no density of its own, 0 where the caller's table is not a table, 0 where no row of it is at or below that density, and 0 where row 2 is not on the shipment; 0 is not a reading, because a position counts from 1"
    },
    {
      "name": "piecesRow3",
      "unit": "handling units",
      "formula": "the piece count of row 3 as typed, held to 1 to 99 and rounded whole. 0 where row 3 is blank, 0 where no piece count is typed on it, and 0 where it is not on the shipment; 0 is not a reading, because the control's own range starts at 1 and no row ever has a piece count of 0. A blank row is one carrying none of these: the caller's own words for it, a packaging word, a dimension above zero, a carton count above zero, a weight above zero. A piece count alone does not start a row, because the control ships at 1 and a row nobody has touched would otherwise report one handling unit on a shipment that has none"
    },
    {
      "name": "cubeFt3Row3",
      "unit": "cubic feet",
      "formula": "the cube of row 3: its pieces times its length times its width times its height over 1728, rounded to 3 decimals. 0 where the row does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because every dimension is at least 1 inch, so a row that carries all three cubes to at least 0.001 cubic feet"
    },
    {
      "name": "weightLbRow3",
      "unit": "pounds",
      "formula": "the weight of row 3 as weighed, rounded to 1 decimal. 0 where the row has no weight typed, 0 where it does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because a weight that reads zero is not a weighing - see `clamping`"
    },
    {
      "name": "densityRow3",
      "unit": "pounds per cubic foot",
      "formula": "the weight of row 3 over its own cube, rounded to 1 decimal, which is also each piece's own density in that row because the pieces of a row share a footprint. 0 where the row has no weight of its own and 0 where it is not on the shipment, and 0 is not a reading there: weightLbRow3 and cubeFt3Row3 beside it are what make this figure a density, and where both are above zero a printed 0.0 is a density that rounds to nothing at one decimal rather than an absence. A shipment total is never split back across the rows by cube to make one"
    },
    {
      "name": "bandIndexRow3",
      "unit": "the position of a row in the caller's own table",
      "formula": "the position in the caller's table that row 3's own density reads, by the same rule as the shipment's. 0 where that row has no density of its own, 0 where the caller's table is not a table, 0 where no row of it is at or below that density, and 0 where row 3 is not on the shipment; 0 is not a reading, because a position counts from 1"
    },
    {
      "name": "piecesRow4",
      "unit": "handling units",
      "formula": "the piece count of row 4 as typed, held to 1 to 99 and rounded whole. 0 where row 4 is blank, 0 where no piece count is typed on it, and 0 where it is not on the shipment; 0 is not a reading, because the control's own range starts at 1 and no row ever has a piece count of 0. A blank row is one carrying none of these: the caller's own words for it, a packaging word, a dimension above zero, a carton count above zero, a weight above zero. A piece count alone does not start a row, because the control ships at 1 and a row nobody has touched would otherwise report one handling unit on a shipment that has none"
    },
    {
      "name": "cubeFt3Row4",
      "unit": "cubic feet",
      "formula": "the cube of row 4: its pieces times its length times its width times its height over 1728, rounded to 3 decimals. 0 where the row does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because every dimension is at least 1 inch, so a row that carries all three cubes to at least 0.001 cubic feet"
    },
    {
      "name": "weightLbRow4",
      "unit": "pounds",
      "formula": "the weight of row 4 as weighed, rounded to 1 decimal. 0 where the row has no weight typed, 0 where it does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because a weight that reads zero is not a weighing - see `clamping`"
    },
    {
      "name": "densityRow4",
      "unit": "pounds per cubic foot",
      "formula": "the weight of row 4 over its own cube, rounded to 1 decimal, which is also each piece's own density in that row because the pieces of a row share a footprint. 0 where the row has no weight of its own and 0 where it is not on the shipment, and 0 is not a reading there: weightLbRow4 and cubeFt3Row4 beside it are what make this figure a density, and where both are above zero a printed 0.0 is a density that rounds to nothing at one decimal rather than an absence. A shipment total is never split back across the rows by cube to make one"
    },
    {
      "name": "bandIndexRow4",
      "unit": "the position of a row in the caller's own table",
      "formula": "the position in the caller's table that row 4's own density reads, by the same rule as the shipment's. 0 where that row has no density of its own, 0 where the caller's table is not a table, 0 where no row of it is at or below that density, and 0 where row 4 is not on the shipment; 0 is not a reading, because a position counts from 1"
    },
    {
      "name": "piecesRow5",
      "unit": "handling units",
      "formula": "the piece count of row 5 as typed, held to 1 to 99 and rounded whole. 0 where row 5 is blank, 0 where no piece count is typed on it, and 0 where it is not on the shipment; 0 is not a reading, because the control's own range starts at 1 and no row ever has a piece count of 0. A blank row is one carrying none of these: the caller's own words for it, a packaging word, a dimension above zero, a carton count above zero, a weight above zero. A piece count alone does not start a row, because the control ships at 1 and a row nobody has touched would otherwise report one handling unit on a shipment that has none"
    },
    {
      "name": "cubeFt3Row5",
      "unit": "cubic feet",
      "formula": "the cube of row 5: its pieces times its length times its width times its height over 1728, rounded to 3 decimals. 0 where the row does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because every dimension is at least 1 inch, so a row that carries all three cubes to at least 0.001 cubic feet"
    },
    {
      "name": "weightLbRow5",
      "unit": "pounds",
      "formula": "the weight of row 5 as weighed, rounded to 1 decimal. 0 where the row has no weight typed, 0 where it does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because a weight that reads zero is not a weighing - see `clamping`"
    },
    {
      "name": "densityRow5",
      "unit": "pounds per cubic foot",
      "formula": "the weight of row 5 over its own cube, rounded to 1 decimal, which is also each piece's own density in that row because the pieces of a row share a footprint. 0 where the row has no weight of its own and 0 where it is not on the shipment, and 0 is not a reading there: weightLbRow5 and cubeFt3Row5 beside it are what make this figure a density, and where both are above zero a printed 0.0 is a density that rounds to nothing at one decimal rather than an absence. A shipment total is never split back across the rows by cube to make one"
    },
    {
      "name": "bandIndexRow5",
      "unit": "the position of a row in the caller's own table",
      "formula": "the position in the caller's table that row 5's own density reads, by the same rule as the shipment's. 0 where that row has no density of its own, 0 where the caller's table is not a table, 0 where no row of it is at or below that density, and 0 where row 5 is not on the shipment; 0 is not a reading, because a position counts from 1"
    },
    {
      "name": "piecesRow6",
      "unit": "handling units",
      "formula": "the piece count of row 6 as typed, held to 1 to 99 and rounded whole. 0 where row 6 is blank, 0 where no piece count is typed on it, and 0 where it is not on the shipment; 0 is not a reading, because the control's own range starts at 1 and no row ever has a piece count of 0. A blank row is one carrying none of these: the caller's own words for it, a packaging word, a dimension above zero, a carton count above zero, a weight above zero. A piece count alone does not start a row, because the control ships at 1 and a row nobody has touched would otherwise report one handling unit on a shipment that has none"
    },
    {
      "name": "cubeFt3Row6",
      "unit": "cubic feet",
      "formula": "the cube of row 6: its pieces times its length times its width times its height over 1728, rounded to 3 decimals. 0 where the row does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because every dimension is at least 1 inch, so a row that carries all three cubes to at least 0.001 cubic feet"
    },
    {
      "name": "weightLbRow6",
      "unit": "pounds",
      "formula": "the weight of row 6 as weighed, rounded to 1 decimal. 0 where the row has no weight typed, 0 where it does not carry its piece count and all three dimensions, and 0 where it is not on the shipment; 0 is not a reading, because a weight that reads zero is not a weighing - see `clamping`"
    },
    {
      "name": "densityRow6",
      "unit": "pounds per cubic foot",
      "formula": "the weight of row 6 over its own cube, rounded to 1 decimal, which is also each piece's own density in that row because the pieces of a row share a footprint. 0 where the row has no weight of its own and 0 where it is not on the shipment, and 0 is not a reading there: weightLbRow6 and cubeFt3Row6 beside it are what make this figure a density, and where both are above zero a printed 0.0 is a density that rounds to nothing at one decimal rather than an absence. A shipment total is never split back across the rows by cube to make one"
    },
    {
      "name": "bandIndexRow6",
      "unit": "the position of a row in the caller's own table",
      "formula": "the position in the caller's table that row 6's own density reads, by the same rule as the shipment's. 0 where that row has no density of its own, 0 where the caller's table is not a table, 0 where no row of it is at or below that density, and 0 where row 6 is not on the shipment; 0 is not a reading, because a position counts from 1"
    }
  ],
  "formula": [
    "a row's cube, cubic feet = rN(pieces x lengthIn x widthIn x heightIn / 1728, 3)",
    "a row's density, pounds per cubic foot = rN(weightLb / that row's cube, 1), where the row carries a weight above zero",
    "the shipment's cube, cubic feet = rN(the rows' own cubes added up, 3)",
    "the shipment's weight, pounds = rN(the rows' own weights added up, 1) where every started row carries a weight above zero and all three dimensions, and otherwise the shipment total weight as typed",
    "the shipment's density, pounds per cubic foot = rN(the shipment's weight / the shipment's cube, 1)",
    "the row of the caller's table = the count of the caller's floors at or below the shipment's density, where the floors climb strictly; nothing where that count is zero",
    "the floor = the floor at that position, as typed",
    "the ceiling = the floor at the next position, where there is one",
    "the gap down, pounds per cubic foot = rN(the shipment's density - the floor, 1)",
    "the pounds to the floor = rN(the gap down x the shipment's cube, 1), where the table has a row below",
    "the cubic feet to the floor = rN(the shipment's cube x the gap down / the floor, 3), where the table has a row below and that floor is above zero",
    "the gap up, pounds per cubic foot = rN(the ceiling - the shipment's density, 1)",
    "the pounds to the ceiling = rN(the gap up x the shipment's cube, 1), where the table has a row above",
    "the cubic feet to the ceiling = rN(the shipment's cube x the gap up / the ceiling, 3), where the table has a row above",
    "the handling units reading another row = the piece counts of the rows whose own position differs from the shipment's, added up, where every row carries its own weight",
    "the handling units on the shipment = the piece counts of the rows carrying all three dimensions, added up",
    "rN(x, dp) = sign(x) x round(abs(x) x 10^dp) / 10^dp, which is half away from zero"
  ],
  "identities": [
    "the shipment's cube is its rows' own cubes added up, to a thousandth of a cubic foot",
    "the shipment's weight is its rows' own weights added up, to a tenth of a pound, wherever the rows govern",
    "the shipment's density times its cube is its weight, to a tenth of a pound either way, allowing for the density's own tenth",
    "the shipment's density is at or above the floor of the row it lands in, and strictly below that row's ceiling where the row has one",
    "a row's own density is at or above the floor of the position IT reads, and strictly below that position's ceiling where it has one",
    "every distance to an edge is zero or more; a negative distance would mean the lookup and the distance disagree about which row the shipment is in",
    "the handling units reading another row are at most the handling units on the shipment",
    "a shipment of one row carries that row's own cube and that row's own density exactly",
    "the row of the table a density reads does not change when the piece count of a row changes, because the count multiplies the cube and the weight is read off the same pieces"
  ],
  "example": {
    "note": "Two pallets on one bill of lading, weighed separately and also weighed as a whole, read against the eight demonstration rows the page ships. Pallet 1 is 48 by 40 by 52 inches and 710 pounds; pallet 2 is 48 by 40 by 64 inches and 180 pounds; the shipment total typed reads 930 pounds, 40 pounds from the 890 the rows add to, so both are reported, the difference is named and the sum of the rows is used. It is the case the page exists to show: the shipment reads row 2 of the table at 6.9 pounds per cubic foot, while pallet 1 on its own reads row 4 at 12.3 and pallet 2 on its own reads row 1 at 2.5, so both handling units read a different row than the shipment does. Rows three to six are not on this shipment, so every field of theirs is 0 and none of those 0s is a reading: see `zeros`.",
    "inputs": {
      "unitCount": 2,
      "shipDate": "2026-10-23",
      "shipmentWeightLb": 930,
      "units": [
        {
          "label": "Pallet 1",
          "packaging": "Pallet",
          "pieces": 1,
          "cartons": 24,
          "lengthIn": 48,
          "widthIn": 40,
          "heightIn": 52,
          "weightLb": 710
        },
        {
          "label": "Pallet 2",
          "packaging": "Pallet",
          "pieces": 1,
          "cartons": 12,
          "lengthIn": 48,
          "widthIn": 40,
          "heightIn": 64,
          "weightLb": 180
        }
      ],
      "bandCount": 8,
      "bands": [
        {
          "floorLb": 0,
          "classLabel": "Band A"
        },
        {
          "floorLb": 4,
          "classLabel": "Band B"
        },
        {
          "floorLb": 8,
          "classLabel": "Band C"
        },
        {
          "floorLb": 12,
          "classLabel": "Band D"
        },
        {
          "floorLb": 16,
          "classLabel": "Band E"
        },
        {
          "floorLb": 20,
          "classLabel": "Band F"
        },
        {
          "floorLb": 24,
          "classLabel": "Band G"
        },
        {
          "floorLb": 30,
          "classLabel": "Band H"
        }
      ]
    },
    "outputs": {
      "rowsOnShipment": 2,
      "rowsStarted": 2,
      "rowsDimsComplete": 2,
      "handlingUnits": 2,
      "cartonsTotal": 36,
      "bandsOnTable": 8,
      "tableUsable": 1,
      "totalCubeFt3": 128.889,
      "totalWeightLb": 890,
      "weightFromRows": 1,
      "weightFromTotal": 0,
      "weightGapLb": 40,
      "weightsBothTyped": 1,
      "shipmentDensityLbFt3": 6.9,
      "bandIndex": 2,
      "bandFloorLb": 4,
      "bandCeilingLb": 8,
      "bandHasCeiling": 1,
      "marginLbToFloor": 373.8,
      "marginFt3ToFloor": 93.445,
      "marginLbToCeiling": 141.8,
      "marginFt3ToCeiling": 17.722,
      "unitsDifferingBand": 2,
      "unitsDifferingBandKnown": 1,
      "waiting": false,
      "piecesRow1": 1,
      "cubeFt3Row1": 57.778,
      "weightLbRow1": 710,
      "densityRow1": 12.3,
      "bandIndexRow1": 4,
      "piecesRow2": 1,
      "cubeFt3Row2": 71.111,
      "weightLbRow2": 180,
      "densityRow2": 2.5,
      "bandIndexRow2": 1,
      "piecesRow3": 0,
      "cubeFt3Row3": 0,
      "weightLbRow3": 0,
      "densityRow3": 0,
      "bandIndexRow3": 0,
      "piecesRow4": 0,
      "cubeFt3Row4": 0,
      "weightLbRow4": 0,
      "densityRow4": 0,
      "bandIndexRow4": 0,
      "piecesRow5": 0,
      "cubeFt3Row5": 0,
      "weightLbRow5": 0,
      "densityRow5": 0,
      "bandIndexRow5": 0,
      "piecesRow6": 0,
      "cubeFt3Row6": 0,
      "weightLbRow6": 0,
      "densityRow6": 0,
      "bandIndexRow6": 0
    }
  },
  "not_covered": [
    "Any freight rate, cost, quote, discount or accessorial figure. There is none here and none on the page; the only money figure on the page is the one price of the two files it sells beside the arithmetic.",
    "Any item number from a published classification directory, and any reproduction of such a directory. The break table is the caller's own.",
    "Whether a class will be accepted. A wrong class is reweighed and reclassed at the shipper's cost; nothing here is a guarantee and nothing here is a record a carrier has agreed to.",
    "Whether a density break table may be used at all, and on what terms. That is a question for the caller and their carrier.",
    "Packaging, palletising, stacking, hazardous materials, liability and insurance.",
    "Where the overhang goes. The dimensions are whichever the caller types, and a carrier measuring at the widest point will get a larger cube and a lower density than one measuring at the pallet.",
    "Splitting a shipment total across its rows. It is never done, because a total divided back out by cube manufactures a per-row density equal to the shipment's and hides the light row riding with the heavy one.",
    "Any shipment of more than six rows of handling units, or any table of more than twelve rows.",
    "Dates. The ship date is printed and never parsed, so nothing here orders, compares or validates one.",
    "Anything about the caller. No figure the caller types is stored and none of it is sent anywhere, and no identifier of the caller is held. The page that carries this arithmetic does report up to three cookie-free counts of its own use to the site's own event host, one as the page opens, one as the block that offers the workbook comes into view and one as the buy link is clicked; each carries the page's address, an id that lasts the one visit, and on the first the host the reader arrived from, and none of them carries a figure anybody typed. Stated 2026-10-24 (round 2, B3: the page reported these counts and this sentence said nothing was sent)."
  ],
  "no_advice": "Arithmetic on figures the caller types, and a lookup over a table the caller confirms with their carrier. It recommends no dimension, no weight, no packaging and no class, it names no carrier and no broker, and it is not a carrier, a tariff, a classification authority or advice of any kind."
}
