App

Excess cost

The per-item premium: gluten-free price minus regular price, clipped at zero so a sale on the GF item never goes negative. Stored on each item row and rolled up into the household's GF premium for the month and the year.

Excess cost is the per-item premium math: gluten-free price minus regular price, clipped at zero so a sale on the gluten-free item never goes negative. It is the stored field on each item row in Gluten Hero, and it is what rolls up into the household's GF premium for the month and the year.

The clip-at-zero piece is the only part of the math that is not obvious. A sale on the gluten-free pasta that brings it below the regular pasta price would, on a literal subtraction, produce a negative number for that item. Subtracting a negative would reduce the household's annual medical-expense total, which is not how the IRS rule works; the special-diet premium is the increment above the ordinary-diet cost, not a household-wide GF-vs-regular balance. So the per-item excess is clipped at zero, the household keeps any savings from the sale, and the medical math stays clean.

Items flagged GF-Only do not use the excess-cost formula. Their full price counts as a medical expense, because there is no ordinary-diet equivalent to subtract from. Items where the household has not entered a regular price do not produce an excess-cost figure; they are tracked but not summed into the premium until a regular price lands.

The field is stored as a generated column on receipt_items in the App Supabase database. The formula is greatest(gf_price - regular_price, 0). It is also exposed in the CSV export and the year-end report as the per-item delta.

For the full concept, read Building the gluten-free vs gluten control basket.

Read more

Where this term shows up in context

Open article

Browse the full glossary

A-Z list of every term used across the Resources Library, with category filters and live search.

Open the glossary