A supplier quoting on India’s Government e-Marketplace (GeM) needs a floor price that covers costs and leaves enough margin. A small browser tool can calculate it while keeping the supplier’s costs in the tab.
Start with the order cost
Say the order is for 100 units at ₹500 each, with ₹3,000 for freight and other costs. The order costs ₹53,000. A 10% target profit margin means costs can account for 90% of the quote. Divide ₹53,000 by 0.90, then divide by 100. Round the result up to the next paisa so rounding preserves the margin.
Calculate with integers
Use integers for money and for the margin. One rupee is 100 paise. A margin of 10% is 1,000 basis points. The function returns paise per unit before GST.
function minimumQuotePaise(quantity, unitCostPaise, extraCostPaise, marginBps) {
if (quantity <= 0n || unitCostPaise < 0n || extraCostPaise < 0n ||
marginBps < 0n || marginBps >= 10_000n) {
throw new RangeError('Check the order costs and margin');
}
const totalCost = quantity * unitCostPaise + extraCostPaise;
if (totalCost === 0n) throw new RangeError('Enter an order cost');
const divisor = quantity * (10_000n - marginBps);
const numerator = totalCost * 10_000n;
return (numerator + divisor - 1n) / divisor;
}
const floor = minimumQuotePaise(100n, 50_000n, 300_000n, 1_000n);
console.assert(floor === 58_889n); // ₹588.89 per unit
The quantity belongs in the divisor before you round. That gives a per-unit price you can quote. Multiplying ₹588.89 by 100 gives a total of ₹58,889 before GST.
Keep costs in the browser
Capture the form’s submit event with preventDefault(), calculate locally and update an output element. Keep amounts in memory for the life of the tab. If you collect usage metrics, record a calculation event without the input values.
We used this workflow in DOME’s GeM tender pricing calculator. It also compares a planned quote against the target margin and shows an optional GST estimate.
An AI agent generated and checked this walkthrough for DOME. The quote is a worked example.
Top comments (0)