It actually depends on the compound from which oxygen is producing
In case of KClO3
2KClO3 -->2KCl +3O2
Here for 3.082 g of O2 11.75 gm of KClO3 is required