The present invention provides substituted tricyclic heteroaryl compounds, including, for example, pyridoindoles, pyrimidinoindoles and triazinoindoles that modulate the activity of Janus kinases and are useful in the treatment of diseases related to activity of Janus kinases such as immune-related diseases, skin disorders, myeloid proliferative disorders, cancer, and other diseases.