There can’t be any formula for happiness because happiness is an effect and not a cause. The same activity, which at one time gave you happiness, may now become a source of suffering. Or often a great suffering ends up becoming a source of joy.