I have a 1997 ohv 4.0 ranger and I'm looking for another 4.0 motor to put into it. I just dont know what years will fit and work with the computer. Any information will be helpful. Thanks
Welcome to the forum
The 4.0l OHV engine was used in Rangers from 1990 to 2000, any year will work with your computer BUT.................................
1990 to 1996 engines used a 6 bolt crank shaft, so you would need a 6 bolt flywheel(manual trans) or 6 bolt Flexplate(automatic), not expensive parts
1997 to 2000 used an 8 bolt crank, so your current flywheel or flexplate will fit
1998-2000 heads had smaller exhaust ports, for faster warm up, I believe your 1997 exhaust manifolds will work, but if you can get 1998-2000 exhaust manifolds with the used engine do it
In any case you will need to swap over your upper and lower intake manifolds so your 1997 wiring harness will match up.
And maybe swap over the oil pan depending on 2WD or 4x4
New oil pump at your discretion, oil pump failure was never an issue on these engines
Always change the rear Main Seal anytime you can
Check all the Core plugs(freeze plugs) replace any that have any signs of rust, or just replace them all on spec they are cheap
If you get a 1999/2000 it will have a 2 wire Cam sensor, you will need to swap over your 3 wire Cam sensor and tower
The 2001 to 2011 Rangers used the 4.0l SOHC engines your computer can not run these
1997 to 2000 Explorers had 4.0l SOHC engines as an OPTION, but came with 4.0l OHV as standard engine
1994-2000 Mazda B-4000 used 4.0l OHV
1991 to 2000 Explorer used 4.0l OHV, see above
1990-1997 Aerostar used 4.0l OHV
Any of these will work in your 1997, with above requirements
And just a heads up on the 4.0l OHV engines, they all had a weak spot between valve seats in the heads, so if overheated they would crack, not may crack, will crack.
Hard to tell if a used engine has this problem, unless you can hear it running and make sure coolant doesn't bubble up in radiator on cold start
Compression test "may" show this, but not definitive