The cost of replacing an O2 sensor can vary depending on the make and model of the vehicle and the location of the repair. On average, the cost can range from $100 to $300 for parts and labor, but some high-end models can cost upwards of $1,000. It is best to consult a professional mechanic to get an accurate estimate for your specific vehicle.