Formulas & Method

← Back

What this page is

Every number the calculator produces comes from the formulas below. They mirror the standard mill costing method and are listed so anyone can verify, audit, or reverse-engineer the result. All yarn counts are English cotton count (Ne).

Constants

Warp constant120 ÷ 1852 = 0.064795
Weft constant1693.33

1693.33 = 768.096 m per hank ÷ 0.4536 kg per lb — the standard English-count length-to-weight figure. 120/1852 is the warp derivation used by the source method, balanced by the per-mill Average factor.

Warp yarn — per metre

Each warp yarn, using its own count, price and % share of ends:

warp kg/m = (WarpReed × WarpRS × Share% ÷ 100 × 120 ÷ 1852) ÷ WarpCount ÷ Average
warp cost/m = warp kg/m × WarpPrice

WarpRS = warp reed space (inches). No wastage is applied to warp. Multiple warp yarns are each computed and summed.

Sizing — per metre

sizing/m = SizingRate × (warp kg/m of that yarn)

Charged on the warp weight only, per ₹/kg. Summed across warp yarns.

Weft yarn — per metre

Weft uses picks and its own reed space, with wastage applied here (and only here):

weft base/m = (Picks × WeftRS × Share% ÷ 100) ÷ 1693.33 ÷ WeftCount
weft kg/m = weft base/m × (1 + Wastage% ÷ 100)
weft cost/m = weft kg/m × WeftPrice

WeftRS is a separate field from WarpRS — typically ~0.5–1 inch less than warp reed space. This is the single biggest source of costing error if set equal to warp.

Weaving & warping — per metre

majuri/m = MajuriRate × Picks
warping/m = WarpingRate (flat ₹/m)

Majuri (weaving) is per pick, not per metre of cloth. Warping is a flat per-metre charge.

Naked cost & selling price

naked/m = Σ warp cost + Σ sizing + Σ weft cost + majuri + warping
price(p%) = naked/m × (1 + p ÷ 100)

Profit is markup on cost (5%–15% ladder plus a custom %). Naked = 0% profit.

Tippin — full order scale

For an order of L metres, reusing the exact per-metre weights above:

yarn kg (order) = warp kg/m × L + weft kg/m × L
cones = ⌈ total kg ÷ ConeWeight ⌉
bags = ⌈ cones ÷ ConesPerBag ⌉
yarn cost (order) = (Σ warp cost + Σ weft cost) × L
production cost = naked/m × L
order value = price(p%) × L
profit in hand = order value − production cost

⌈ ⌉ means rounded up. Cone weight and cones/bag depend on yarn type and quality (default 1.89 kg, 24/bag).

Worked example (verifies against source app)

Reed 64 · Warp RS 72 · Weft RS 71 · Picks 68 · Average 104 · Warp & Weft 30s @ ₹265/kg · Sizing ₹22/kg · Wastage 5% · Majuri ₹0.10/pick

Component₹/m
Warp yarn25.36
Sizing2.11
Weft yarn (incl. 5%)26.45
Majuri6.80
Warping0.00
Naked cost60.71

Setting weft reed space to 72 instead of 71 gives ₹61.08 — a ₹0.37/m error, or ₹9,250 on a 25,000 m order. This is why warp and weft reed space are kept separate.

Yarn units — Count · Denier · Lea

Every yarn is converted to metres-per-kg. Same m/kg ⇒ same weight ⇒ same cost, whichever unit it is typed in.

Count (Ne): m/kg = Ne × 1693.33
Denier: m/kg = 9,000,000 ÷ Denier
Lea (linen): m/kg = Lea × 604.8

Inside the verified costing formulas the yarn enters as effective Ne = m/kg ÷ 1693.33, so Ne inputs reproduce the source app to the paisa, and Denier/Lea inputs use the same physics.

GLM & GSM — grey fabric

warp g/m = (WarpReed × WarpRS × Share%÷100) ÷ (m/kg) × 1000
weft g/m = (Picks × WeftRS × Share%÷100) ÷ (m/kg) × 1000
GLM = Σ warp g/m + Σ weft g/m
GSM = GLM ÷ (Width in metres)  ·  Width m = Width(in) × 0.0254

Clean grey weight — no wastage, no finish. If Width is blank, Weft RS is used as the width. Crimp is not added; treat as loomstate approximation.

Price Adjuster

Target GLM T. With warp weight W and weft weight F (g/m), each lever solved alone:

new reed = reed × (T − F) ÷ W
new picks = picks × (T − W) ÷ F
new warp count = count × W ÷ (T − F)   (Denier: count × (T − F) ÷ W)
new weft count = count × F ÷ (T − W)   (Denier: inverse likewise)

The exact value is shown as the truth; the nearest whole number is shown beside it for reed and picks. Cost for each option is recomputed with the full verified engine — including majuri moving with picks. Sensitivity table shows ΔGSM and Δcost for one unit step of each lever.

Field colour key

Every input and select on the Costing, Adjuster and Tip-in pages carries one of three states, tracked live as you type:

Loading a saved costing flips every restored field to green, since those values came from a deliberate save, not a placeholder or a live auto-fill.

Adjuster — "Hold GSM, cut cost" (Mode 2)

Unlike Mode 1 (solve one lever alone), Mode 2 looks for a cheaper combination of two levers that keeps GLM unchanged. Four levers are available — Warp reed, Picks, Warp count(s), Weft count(s) — each markable "Keep constant"; at least two must stay free for a trade to exist.

For blends, the count lever scales every yarn on that side by the same factor, preserving the blend's % ratio.

step 1 — enumerate every pair of free levers (A, B)
step 2 — sweep A over ±30% of its current value in 121 steps; for each step, solve B in closed form so GLM returns exactly to target
step 3 — recompute the FULL verified engine for every candidate (so majuri moves with picks, sizing moves with warp weight, etc.)
step 4 — keep only candidates whose GLM is within ±0.5% of target AND whose naked cost is strictly lower than the current naked cost
step 5 — score by least change: Σ |Δlever| ÷ current lever value, summed over the levers that moved; sort ascending; show the top 5

The closed-form solve for B: warp (or weft) side weight as a function of its count-scale factor s is C1/s + C2·s, where C1 sums the grey weight of Ne/Lea yarns on that side (weight ∝ 1/count) and C2 sums Denier yarns (weight ∝ count). Solving C1/s + C2·s = K for a required weight K is a quadratic in s (linear if the side is single-unit). Reed and Picks act as simple multipliers on their side's total. No search, no iteration beyond the fixed 121-point sweep — every candidate is exact algebra, then verified by recomputing the real engine. If no candidate beats the current cost, the page says so plainly rather than showing an empty table.

Quotation mode

Every page's action row has an "Include margin" toggle, on by default.

With margin ON, PDF and WhatsApp output show the full cost breakdown: yarn costs, sizing, majuri, warping, naked cost, and the profit ladder. With margin OFF ("quotation mode"), all of that is omitted — the document shows only construction/spec details and a single line, Rate: ₹X/m, where X is the @custom% selling price. Nothing in the quotation reveals that the rate contains a margin. The Tip-in quotation likewise drops yarn/production cost and profit-in-hand, showing only kg/cones/bags and Order value: ₹Y (Y = rate × order length). The PDF header reads "Quotation" instead of "Costing Slip" in this mode, so it reads as a clean customer-facing document.