Unlike the falling cat, lizards can right themselves in mid-air by a swing of their large tails in one direction causing the body to rotate in the other. Here, we developed a new three-dimensional analytical model to investigate the effectiveness of tails as inertial appendages that change body orientation. We anchored our model using the morphological parameters of the flat-tailed house gecko Hemidactylus platyurus. The degree of roll in air righting and the amount of yaw in mid-air turning directly measured in house geckos matched the model's results. Our model predicted an increase in body roll and turning as tails increase in length relative to the body. Tails that swung from a near orthogonal plane relative to the body (i.e. 0-30° from vertical) were the most effective at generating body roll, whereas tails operating at steeper angles (i.e. 45-60°) produced only half the rotation. To further test our analytical model's predictions, we built a bio-inspired robot prototype. The robot reinforced how effective attitude control can be attained with simple movements of an inertial appendage.