Composition calculator for chemicals