Clothing store owner-operator - per-item floor-price calculator - when a customer haggles, answer "what's your best price" in three seconds - enter cost, target markup, and days on floor (the floor slides down with age), and get three prices at once - target price (protects the margin goal, the normal floor), break-even price (cost plus capital carry, no loss but no gain), and clearance price (projected loss displayed for the owner to rule on); everything computes forward from cost, never backward from ticket discount, because apparel ticket prices are inflated and "30% off" tells you nothing about whether you are making money; a single offline file that opens in a phone browser
You are a coding agent building tools for
independent clothing store owners. Build a
single-file HTML calculator (no backend, no
external dependencies, offline, opens
straight in a phone browser) for one job:
instant per-item floor prices during
haggling.
The real problem: inside the three seconds
after "what's your best price," the owner
is really answering three questions - what
did this cost, how long has it hung, and
what do I make or lose at a given number.
Mental math fails, and the result is either
a scared-off customer or an evening-books
surprise. Apparel ticket prices are
inflated, so reasoning backward from "what
discount off ticket" is meaningless - the
math must run forward from cost.
1. Inputs (three fields; single-item and
batch modes):
- Per-unit cost
- Target markup (the store's pricing
habit, e.g. 2x - set once, reused)
- Days on floor (from stocking date;
batch mode takes one date per
batch)
2. Computation and output (three prices,
one screen, large type):
Price 1, target:
- Cost x (1 + target markup)
- Position: the normal selling floor -
below it, the owner consciously
knows "I just gave away the target
margin"
Price 2, break-even:
- Cost + carrying cost (cost x daily
capital rate x days on floor; the
daily rate ships with a
deliberately conservative
placeholder the owner can edit)
- Position: the physical no-loss
line - below it is a real loss
Price 3, clearance:
- The owner enters (or slides to)
an intended clearance price; the
tool live-displays "projected
loss per unit"
- Position: what the carrying cost
and season risk of NOT clearing
translate to in money - the tool
draws no conclusion; ruling is
the owner's
3. Age linkage (the core rule):
- All three prices move with days
on floor: carrying cost inside
the break-even climbs daily
- An "age strip" on screen: days
tinted in three bands (normal /
watch / alarm - thresholds the
owner sets), with the alarm band
showing "another X days of
carrying = Y per unit" - turning
"waiting" into visible money
4. Field-use design:
- Big buttons, big type (one-handed,
standing in the store); the last
10 calculations kept and
reviewable
- Batch mode: enter a whole lot,
sort by "projected loss,
ascending" - clear the
smallest-loss items first
(freeing cash from edge pieces
before deciding on the anchors)
- No ticket price displayed, no
discount ratio computed - every
output is an absolute amount, so
the owner cannot be led around by
"what percent off" language
Boundaries:
- No prediction whether the item
sells - the tool computes "what I
make or lose at a given price";
the market call is the owner's
- No network, no cloud - data stays
in the local browser
- Chinese interface (localize if
built for another market),
restrained plain styling, no ad
slots, no promo copy
Why it is written this way
Computing forward from cost and never showing a discount ratio is the tool's most consequential decision. Inflated ticket prices are the industry's default setting - the same garment marked up 2.5x versus 3x makes "half price" two entirely different economics. An owner who thinks in "percent off" is navigating with a coordinate system even they don't trust; every output in absolute currency (this one makes 40, loses 15) resets navigation to money itself. Banning the discount display is a UI rule rather than advice because the moment a conversion button exists, an owner mid-haggle will tap it, work out "that's like X% off," and slide right back into the customer's frame.
The three prices concede a reality: the floor is not a line but a band, and each point on it encodes a different judgment. Conceding below target is "giving margin"; below break-even is "losing money"; clearance is deliberately swapping loss for cash flow - three decisions of entirely different nature, and collapsing them into one "bottom price" destroys the basis for choosing. Clearance deliberately renders no verdict and only shows the projected loss, which is the tool's sense of boundary: whether to clear depends on cash position, season distance, and alternate channels - facts the tool doesn't have and the owner does.
Age linkage turns "waiting" into visible money, attacking the most stubborn mental account in independent retail: dead stock's losses are silent (they appear in no day's register), so "let's wait another week" always feels rational. The alarm band's line - "another X days of carry = Y per unit" - daily-rates the price of waiting; the owner needs no inventory theory, only to see the number climbing each time the tool opens. The placeholder capital rate is conservative rather than an invented "industry average" for the same reason: the parameter varies by person and by loan cost - conservative beats fabricated.
Batch mode's "smallest projected loss first" ordering encodes counterintuitive clearance practice: when cash is tight, the sequence is not "dump the worst pieces first" (that is instinct) - move the low-loss edge pieces to free cash fast and decide on the anchors once there is cushion. What to sell first is itself a cash-flow decision, and the tool fixes it as the default sort.
Variables
| Variable | Description |
|---|---|
| Target markup | The store's habitual multiple - back it out of your own history (median of usual selling price / cost), never copy another store; recalibrate each season from actuals |
| Daily capital-carry rate | What one garment's capital costs per day - with a loan, the loan's daily rate; without, the daily yield of the alternative use or a self-chosen opportunity cost; the conservative placeholder is deliberate - editing it beats leaving it |
| Age-band thresholds | The two dividers between the three tints (say 30/60/90 days) - set per category (summer pieces get tighter bands, basics looser); the thresholds double as the clearance-decision reminder cadence, so act on them once set |