Go and say unto David, Thus saith the LORD, I offer thee three things; choose thee one of them, that I may do it unto thee. So Gad came to David, and told him, and said unto him, Shall seven years of famine come unto thee in thy land? or wilt thou flee three months before thine enemies, while they pursue thee? or that there be three days' pestilence in thy land? now advise, and see what answer I shall return to him that sent me.
-2 Samuel 24:12-13
Go and tell David, saying, Thus saith the LORD, I offer thee three things: choose thee one of them, that I may do it unto thee. So Gad came to David, and said unto him, Thus saith the LORD, Choose thee Either three years' famine; or three months to be destroyed before thy foes, while that the sword of thine enemies overtaketh thee; or else three days the sword of the LORD, even the pestilence, in the land, and the angel of the LORD destroying throughout all the coasts of Israel. Now therefore advise thyself what word I shall bring again to him that sent me.
-1 Chronicles 21:10-12
The average unbeliever will say there is a contradiction here, that it can't be three and seven at the same time. However, there is no contradiction here. The problem with the unbeliever is that they are cross-reference one part of Scripture, and not taking the context and story as a whole to understand it.
Three chapters prior to 24, in 2 Samuel, we find the following verse:
Then there was a famine in the days of David three years, year after year; and David enquired of the LORD. And the LORD answered, It is for Saul, and for his bloody house, because he slew the Gibeonites.
-2 Samuel 21:1
And Joab gave up the sum of the number of the people unto the king: and there were in Israel eight hundred thousand valiant men that drew the sword; and the men of Judah were five hundred thousand men.
-2 Samuel 24:9
And David's heart smote him after that he had numbered the people. And David said unto the LORD, I have sinned greatly in that I have done: and now, I beseech thee, O LORD, take away the iniquity of thy servant; for I have done very foolishly.
-2 Samuel 24:10
Our question is answered by 1 Chronicles, telling us that the punishment is three years additional famine in Israel, if David chooses that path. 2 Samuel is telling us the total amount of years Israel would suffer famine, and 1 Chronicles is telling us the total number God is adding for punishment.
In addition, defenders of the new-age, with modernized bible versions, maintain contradictions because they have attempted to correct "errors" that they claim are in the King James Bible. For example, the NIV in 2Sam 24:13 reads:
This would be contradictory because they have already suffered three years of famine according to chapter 21, which mean God had punished Israel prior to an offense.
A simple reading of the Word of God is more than enough to answer questions about the time frames, but no answer will ever be enough for those who hate God and His Word. Unbelieving scoffers and websites will repeat this so-called "contradiction" even in the face of logical answers because they despise the thought of an absolute Authority to which they must answer.