Ammonium Nitrate can make a big boom but I don't think that all boomable chemicals are being made from the same ingredients.
Almost all explosives except for this stuff https://en.wikipedia.org/wiki/Acetone_peroxide contain nitrogen. (TATP is not used as a military explosive because it will blow up if you look at it the wrong way.) In a lot of cases that is going to come from nitric acid which in turn is made from ammonia which could otherwise be used to make fertilizer. As you point out, Ammonium Nitrate is a powerful explosive which is c…
What's the ratio of "nitrates input" for fertilizer vs explosives? A ton of ammonia is fertilizer all by itself but processed might only be 100kg of TNT (totally ignoring all the other inputs).