Verses 1-9: The Census Command and Execution. The LORD's anger leads Him to incite David to number Israel and Judah, despite Joab's objections. The census is conducted over nine months and twenty days, revealing the military strength of Israel and Judah.
Verses 10-17: David's Repentance and God's Choice of Punishment. David is convicted of his sin and pleads for forgiveness. God, through the prophet Gad, offers David three punishments. David chooses to trust God's mercy, resulting in a devastating plague that kills seventy thousand people, which God then halts.
Verses 18-25: The Altar and the End of the Plague. Following God's instruction, David purchases Araunah's threshing floor to build an altar. Despite Araunah's generous offer, David insists on paying full price, emphasizing the costliness of true worship. David's sacrifices appease God, and the plague ceases.