Was it 40,000 as per I Kings 4:26 “And Solomon had forty thousand stalls of horses for his chariots, and twelve thousand horsemen” (KJV)
Or was it 4,000 as per II Chronicles 9:25 “And Solomon had four thousand stalls for horses and chariots, and twelve thousand horsemen; whom he bestowed in the chariot cities, and with the king at Jerusalem.” (KJV)
There are no contradictions in the Bible. The above is easily explained as follows:
I Kings 4:26 talks about the number of horses for his chariots whilst II Chronicles talks about the number of chariots. King Solomon simply had 10 horses per chariot.
As you can see, this is NOT a contradiction.