Assuming it’s at the upper range of the size estimate above, and of average rocky density, the kinetic energy of the impact would be something like a 10 billion megaton nuke.
If we could steer it to hit one of Mars’s poles, it might do a bit of terraforming for us!
Where did my math go wrong? I got about 50,000 megatons. Assuming the high-end of 22km and a rocky/metallic density of 5000 kg/cubic meter (and assuming it's a cube):
kinetic energy = 1/2 m v**2 = 1/2 * size * density * v**2
= 1/2 *(22000 m)**3 * (5000 kg/m**3) * (90 m/s)**2 / (4.184E15 J/megaton)
= 52,000 megaton
If it's an icy comet then the density is more like 500 kg/cubic meter, or 1/10th that number.
I can not confirm this; the parent calculation is the correct one. I can't immediately find what your error was. (edit: It's your [km/s]—you wrote [m/s] by mistake).
(let* ((ρ ([g (cm -3)] 5))
(d ([km] 22))
(m (* ρ (expt d 3)))
(v ([km (s -1)] 90))
(ke (* 1/2 m (expt v 2)))
(kg-tnt ([J (kg -1)] 4.2e6)))
(values (/ ke kg-tnt)
(as [megaton] (/ ke kg-tnt))))
5.133857142857142e19 [KG]
5.133857142857143e10 [MEGATON]
If we could steer it to hit one of Mars’s poles, it might do a bit of terraforming for us!