A dermal, transdermal and/or mucosal formulation for topical application on skin, comprising an active pharmaceutical ingredient and a pharmaceutically acceptable solvent, and an anti-solvent wherein the active pharmaceutical ingredient is soluble in the solvent in the absence of the anti-solvent, and wherein the active pharmaceutical ingredient is substantially in the solid state in the presence of the anti-solvent. A method for increasing the stability of an active pharmaceutical ingredient.