Home › Guides › How We Calculate

How TruPrice Calculates Used Car Fair Value

Updated July 2026

A transparent look at the XGBoost model behind TruPrice — what data it uses, how it handles condition and mileage, and why it produces a different number than listings-based averages.

Stage 1: XGBoost Asking Price Prediction

The core model is an XGBoost gradient boosting regressor trained on real Pakistan used car market transaction data. XGBoost is a tree-based ensemble method that handles the non-linear relationships in car pricing — for example, a 2020 Corolla Altis depreciates differently than a 2020 Cultus for the same calendar year.

Features used by the price model:
→ Make, Model, Variant
→ Year of manufacture
→ Engine displacement (cc)
→ Transmission type
→ Assembly (Local / Imported)
→ Fuel type
→ Body type
→ Registration city / province
→ Mileage (km)
→ Variant rank (ordinal trim level)

Stage 2: Negotiation Buffer

The model outputs an estimated asking price — the price a seller would list the car for. A category- and age-specific negotiation buffer (2D lookup table: category × age bracket) converts this to a base transaction price. This represents what informed buyers actually pay.

Stage 3: Condition-Based Inspection Discounts

When inspection scores are provided, each of the 8 sections is compared to a par score for the car's category and age bracket. The deviation from par determines a condition band (Excellent / Good / Fair / Bad). Each band maps to a discount rate applied to the base price. The sum of all section discounts produces the final fair price.

Stage 4: Mileage Verdict

A second XGBoost model predicts expected mileage for the car's make, model, age bracket, and category. Actual mileage entered is compared to this prediction. The resulting deviation produces a verdict: Low Mileage, Normal Mileage, or High Mileage — shown alongside the fair price for context.

Coverage

26
Car models
143
Trim variants
5
Age brackets

Frequently Asked Questions

How does TruPrice calculate used car prices?
TruPrice uses an XGBoost gradient boosting model trained on real Pakistan market transactions. It takes make, model, variant, year, mileage, transmission, city, and more as inputs. The output is an asking price estimate, which is then adjusted by a negotiation buffer and optional inspection condition discounts.
Is TruPrice's AI price calculator accurate?
The model is trained on real Pakistan market listing data across 26 models, multiple cities, and years. For well-represented models like Toyota Corolla and Honda Civic, prediction error is typically under 10% of market price. Rarer models or unusual configurations will have wider uncertainty ranges.
Why is TruPrice's price different from PakWheels listings?
PakWheels shows asking prices — what sellers want. TruPrice calculates the fair transaction price — what informed buyers should actually pay. The difference is the negotiation buffer (3–7%) plus any condition-based discounts. TruPrice's number is what you should be paying, not what the listing says.

See the model in action

Enter any car details and get the XGBoost fair price estimate — free, no signup.