You should read the inventory tutorial it will help you understand it better. Inventory CONSUMPTION: Inventory Items, Products, Recipes, and Order Tags
You set your base unit to the smallest unit used so in your case g or gram. You set your recipe to use a portion of kilogram and then if you type .25 it will do 250 grams if you type 1 it will do 1 kg.
I can go on and on but you need to read the tutorial and try some things until you understand it.