I think AquaticPlantCentral.com's "
Fertilator" already does this for KNO3, KH2PH4, etc... Also,
Chuck Gadd's will convert as well (you type in tsp's and it will show grams as well).
If you're using EI, the tsp method is much quicker and faster. You're not after exactitude with EI, but providing "more than minimum" and "less than too much".
-Jason