LCM( 18, 42 ) = 126
The formula for finding LCM is
$$ \text{LCM} (a, b) = \frac{ a \cdot b }{ \text{GCD}(a,b)} $$In this example we have: a = 18, b = 42 and GCD(18, 42) = 6.
$$ \text{LCM} (18, 42) = \frac{ 18 \cdot 42 }{ \text{GCD}(18,42)} = \frac{ 756 }{ 6 } = 126 $$