What is the cancer from chalazion?

Rare. Sebaceous carcinoma is extremely rare but can masquerade as a chalazion. I've heard of cancers appearing in longstanding chalazions; whether this is cause and effect, an ophthalmologist might know. It's good to send the material from an excised chalazion to the lab to be sure.