Short and Long Term Fuel Trim

Technical Library › Functions and TuningUpdated Sep 2026

Once a VE-based fuel model is set up properly, a wideband sensor can do a lot of the fine fuel work for you. Haltech calls this short term and long term fuel trim. Here's how the two layers work together, which settings actually matter, and how we set them on customer cars.

Why VE tuning makes self-correction possible

In volumetric efficiency (VE) mode, the main fuel table isn't really a fuel table. Each cell describes how well the engine fills its cylinders with air at that load and rpm, usually as a number somewhere between 50 and 100. A cell reading 85 means the cylinders are filling to about 85% of their swept volume there.

The ECU takes that airflow estimate, combines it with engine size, injector flow and fuel type, then works out the injector pulse needed to hit your target air-fuel ratio. That has a useful consequence. If the injector data, displacement, MAP and air temperature readings are all correct, the only thing that can make the measured mixture miss the target is a wrong VE number in that cell.

Manual tuning means nudging those cells until measured matches target. Since the ECU already knows both numbers, it can nudge them itself. That's what closed loop fuel trim is. Some call it auto-tune or self-learning. On Haltech Elite and Nexus ECUs with a wideband fitted, it's split into two layers: Short Term Fuel Trim (STFT) and Long Term Fuel Trim (LTFT).

The two layers in plain English

Short term (STFT)Long term (LTFT)
SpeedReacts right awayBuilds up gradually
MemoryNone. Forgotten as soon as conditions changeStored and reused next time you're in that area of the map
JobChase the error happening nowAbsorb the error that keeps showing up
NeedsO2 control turned onO2 control plus LTFT turned on

Think of STFT as a driver's hands making constant small steering corrections, and LTFT as the alignment shop fixing the pull so the hands don't have to. STFT alone never teaches the ECU anything. Turn LTFT on and the ECU gradually moves the correction STFT keeps making into a learned value.

Turning on O2 control

In NSP, open the Fuel Tuning section and tick the O2 Control function, or press F4 to open the full function list and enable it from there. The setup page has the obvious entry conditions like engine run time before it starts, minimum coolant temperature and an rpm window. Set those to keep trim out of cold start and cranking.

The settings people actually ask us about are these:

Sensor selection

Pick which wideband input drives the trim. Most cars have one sensor, so there's nothing to decide. With two or more, choose the layout that matches the engine. A straight-six with a split exhaust manifold and a sensor in each pipe, for example, should be set up so each bank is trimmed by its own sensor. A dual-channel controller like the WB2 makes per-bank control straightforward.

STFT Enrichment and STFT Disenrichment

These cap how far the short term trim can add or remove fuel. They're your guard against a failing sensor or an exhaust leak dragging the mixture somewhere dangerous. Keep them tight enough that a bad reading can't do real harm.

Target oscillation amplitude

This one confuses almost everybody. At the default of 0.0, the controller tries to hold the mixture steady on the target. Enter an amplitude and it deliberately swings the mixture either side of target by that much. With a 14.7:1 target and an amplitude of 1.0 AFR, the mixture would cycle between roughly 13.7 and 15.7.

Why would anyone want that? Catalytic converters. A three-way cat stores oxygen when the mixture is lean and uses it up when it's rich, and it works best when it sees that alternating diet. Emissions-focused calibrations use the oscillation on purpose. If you're not specifically tuning to pass a tailpipe test, leave it at 0.

Turning on long term fuel trim

LTFT has its own limits (minimum and maximum learned values) and a minimum temperature below which nothing gets learned. Two items deserve more explanation.

LTFT rich bias

This is a safety margin. With a rich bias entered, the long term trim learns a mixture slightly richer than your target by that percentage, and short term trim then pulls the extra fuel back out while the sensor is working. If the sensor dies, gets unplugged or reads nonsense, short term trim stops, and you're left running on a learned map that errs rich rather than lean. On a boosted engine, that's exactly the failure you want.

LTFT gain table

The gain table controls how quickly short term correction gets written into long term memory, and higher values mean faster learning. It's a table, not a single number, because how much you can trust the data changes across the map.

At higher rpm and load, airflow is stable and the sensor response is quick, so there's enough good information to learn quickly. Near idle and light cruise, the mixture moves around more, sensor lag is proportionally bigger, and learning too fast chases noise. That's why the gain values in the low rpm, low load corner are usually small: STFT handles the moment-to-moment correction there while LTFT learns slowly in the background.

Our setup approach

  1. Get the base numbers right first: injector flow and dead times, displacement, fuel type, and verified MAP and air temperature sensors. Trim can't fix a wrong model, only hide it.
  2. Rough in the VE table by hand so the engine runs cleanly without help.
  3. Enable O2 control with conservative STFT limits and confirm the corrections are small and settle quickly in logs. If STFT oscillates, look at the proportional gain first.
  4. Enable LTFT with a modest rich bias and leave the gain table low at the bottom end.
  5. Drive, log, then review what LTFT learned. Large or lopsided corrections point to a mechanical or setup problem, not a tuning one.
Trim is not a substitute for tuning

Closed loop fuel trim polishes a good map. It won't rescue a wrong injector setup, a vacuum leak or a failing pump, and on high-boost cars we still want the map itself right before we let the ECU make corrections under load.

Troubleshooting fuel trim

SymptomUsually
Mixture hunts rich and lean at steady cruiseSTFT gains too aggressive, or a nonzero oscillation amplitude you didn't mean to set
Trims sitting at their limitsInjector data or displacement wrong, a vacuum or exhaust leak, or a sensor problem
Learned values keep creeping at idleLTFT gain too high in the low rpm and load area
No correction happening at allEntry conditions not met (run time, coolant temp, rpm window) or the wrong sensor selected
One bank trims much more than the otherLeak or injector issue on that bank, or sensors assigned to the wrong banks

Fuel trim FAQ

Where does the target AFR come from?

From the target lambda table. The target changes with load and rpm on purpose, since cruise, idle and full boost need different mixtures. Our note on ignition timing vs air-fuel ratio explains why.

Can I tune a whole car with LTFT?

It'll get the cruise areas close, but it can't replace proper load tuning, and you still have to set ignition timing, transients and enrichments yourself.

Do I need a wideband?

Yes. Closed loop trim needs an accurate wideband reading. Our wideband O2 sensors explained article covers the options.