We consider the theory Th,,i, of Boolean algebras with a principal ideal, the theory Th,,, of Boolean algebras with a maximal ideal, the theory Thac of atomic Boolean algebras with an ideal where the supremum of the ideal exists, and the theory Th,, of atomless Boolean algebras with an ideal where the supremum of the ideal exists. First, we find elementary invariants for Th,,;, and Th,,. If T is a theory in a first order language and a is a linear order with least element, then we let Sentalg(T) be the Lindenbaum-Tarski algebra with respect to T, and we let intalg(a) be the interval algebra of a. Using rank diagrams, we show that Sentalg (Th,,i,) intalg(w'), Sentalg(Th,,,) E intalg(w3) Z Sentalg(Thac), and Sentalg(Th,,) 2 intalg(w2 + w z ) . For Th,,, and Th,, we use Ershov's elementary invariants of these theories. We also show that the algebra of formulas of the theory Tx of Boolean algebras with finitely many ideals is atomic. Mathematics Subject Classification: 03C35, 03C65, 06399.