No cheap way to do it.
96+up cars (most makes/models) use OBD2.
You need a code reader to find out whats up.
Maybe some friendly auto parts store might check it for free or cheap. Some will do that, others dont.
If you cant get a check free, at least rule out simple things (clean plugs, wires, check that all sensors are plugged in, check air filter, gas cap, etc.)
Dont take it to a dealer if you still need to pull the codes. Take it to a midas or some small repair place. They will probably charge you less to run the test.