engine light on for 3yr,no auto problems.What is cost of diagnostic/02sensor on 2005 Hyundai Elantra

what is cost of diagnostic and 02 replacement if needed?
Thanks David

Asked by for the 2005 Hyundai Elantra
if you shop around you may be able to get diagnostic for free, try autozone. if no auto problems, than i would not think the sensor needs replacement. it may be tripping due to slight but manageble issues like it may need a tune up, it may need a fuel system clean, etc.
rec. fuel system clean. ethanol treatment to 1 tank of premium fuel. ethanol blend in fuel causes build in fuel system, combustion chambers, exhaust system and causes increased wear to spark plugs. possible build up trippin your sensor.