Fuel Trim can be used to Diagnose Vacuum and Fuel Delivery Leaks. With the engine idling, look at the Short Term Fuel Trim (STFT) and Long Term Fuel Trim (LTFT) values. Normal range may get high as plus or minus 8, but closer to zero is best. If the numbers are +10 or higher for STFT and LTFT, then your engine is running LEAN. Rev the engine to 1500 to 2000 RPM and keep it steady for half a minute or so. If the fuel trim numbers drops back down to a more normal reading, it then confirms the engine has a vacuum leak at idle. This is due to a vacuum leaks have less of a leaning effect on the fuel mixture as engine speed and load increase.
If the fuel trim readings do not differ much, the lean fuel condition is more likely because of a fuel delivery problem (weak fuel pump, restricted fuel filter, dirty fuel injectors or a leaky fuel pressure regulator) than a vacuum leak.
LTFT fuel trim readings that are trending high might also be the result of a slight ignition misfire that is not bad enough yet to set a misfire code but is bad enough to create a drop in fuel economy. One or more fouled spark plugs that are misfiring occasionally, or a weak ignition coil or bad plug wire that is letting some occasional misfires could be the cause.
You can also use fuel trim to identify dirty fuel injectors. If the LTFT fuel trim readings are trending up (POSITIVE), it implies that the fuel feedback control system is compensating for an air/fuel mixture that is becoming progressively leaner over time. The most likely reason would be dirty fuel injectors. Fuel delivery can be restricted by the accumulation of varnish deposits inside the injector nozzles. The fix here is to clean the injectors. If the fuel trim values return to normal after the injectors have been cleaned, it checks if you have solved the problem. If the fuel trim values does not change after cleaning the injectors, the lean fuel condition may be because of a low fuel pressure or air/vacuum leaks.
You can use fuel trim readings to inspect the response of the oxygen sensors and engine computer to changes you make in the fuel mixture. While the engine is idling, temporarily disconnect a vacuum hose. You should observe the STFT fuel trim readings jump immediately and go POSITIVE, and the LTFT should begin to creep up in response to the artificial lean fuel mixture you have just created by disconnecting the vacuum hose.
To test a rich response, you can feed some propane vapor from a small propane tank into the throttle body or a vacuum hose connection on the intake manifold. This time, you should observe a drop in fuel trim readings, with STFT going NEGATIVE, and LTFT creeping downward in response to the rich fuel mixture.
No change in fuel trim readings when you produce an artificial lean or rich fuel mixture would tell you the engine computer is NOT working in closes loop, or that the oxygen sensor(s) are not reacting to changes in the fuel mixture.