methodology

How datfit predicts your size.

datfit doesn't pull from a generic database. For every recommendation, it reads the actual size chart of the brand you picked (or uploaded) and maps it against your measurements using the algorithm below. The output is one size and a confidence number — not a table to puzzle over.

1. Inputs

For tops and bottoms, datfit needs height (cm), weight (kg), body type (slim / regular / athletic / curvy), and fit preference (tight / regular / loose). For shoes, datfit needs the brand and size you currently wear in any of the 11 supported shoe brands — that pair maps to a foot length range, which becomes the working measurement.

2. Containment-first scoring

Each size in the brand's chart has a min and max for every measurement it tracks (height_cm, weight_kg, foot_cm). For each candidate size, datfit computes two numbers:

  • Outside-distance — how far you fall outside the size's range, normalised by the range's width. If you're inside the range, this is zero.
  • Midpoint-distance — how far you are from the centre of the range, again normalised.

The composite score is outside × 5 + midpoint × 0.1. The 5× multiplier is what makes it containment-first: any size that contains you fully outranks any size you fall outside of, even when the outside size's midpoint is closer. This was the core fix to a real bug in v1.0 where 184 cm / 98 kg was returning Adidas XL instead of L.

3. Body-type bias

For apparel only (not shoes), the body type nudges the pick by ±1 size only when the biased size is reasonably close (score difference under 0.6). The intuition: athletic and curvy builds tend to wear one step up at the same height/weight; slim builds tend one step down. The "reasonably close" gate prevents wild overrides when you're solidly inside one specific size.

4. Fit-preference shift

After the body-type pass, fit preference shifts the answer one step in either direction. "Loose" bumps up, "tight" bumps down, "regular" leaves it alone. The result includes a fit note explaining the shift.

5. Confidence rubric

The confidence number you see is computed as follows:

  • If the picked size contains your measurements: starts at 92, drops 12 × midpoint-distance.
  • If the picked size doesn't contain you: starts at 84, drops 8 × composite score, floor of 50.
  • −4 if fit preference is not "regular" (we shifted off the natural pick).
  • −2 if body type is not "regular" (apparel only).
  • Final clamp: 48–96. Ceiling at 96 because no chart-based prediction is 100% certain.

6. Upload mode

When you upload a size chart instead of picking a known brand, datfit scores you against a generic consensus chart for your gender and garment type — built from averaging all known brand charts in that category. The same body-type and fit-preference logic applies, but the confidence is capped lower (45–88 vs 48–96 for known brands) because we haven't actually parsed your chart's columns yet — that's the OCR work in progress.

Open data

The full size-chart database is public: /data/size_charts.json. Each entry has a brand, gender, type, and a list of sizes with min/max ranges per measurement. Pull requests welcome once the repo is open.

Last reviewed: 2 May 2026.