How long does it take a stye to heal?

Variable. Warm compresses usually has an effect after several days. If it lasts more than a couple of weeks with this treatment it may need some more invasive treatment.