The Ermaying Formation is a geological formation of Anisian (Middle Triassic) age in north-central China. It is found across much of the Ordos Basin, at outcrops within the provinces of Shaanxi, Shanxi, and Inner Mongolia. It is composed of up to 600 m thick sequence of mudstone and sandstone, overlying the Heshanggou Formation and underlying the Tongchuan Formation. In the southern part of the Ordos Basin, the Zhifang Formation is equivalent to the Ermaying Formation.