Let’s find the moment of inertia of an equilateral triangle of side $a$ indirectly by dividing the equilateral triangle into 4 equilateral triangles of slide $\cfrac{a}{2}$ as shown.

Now, the moment of inertia is proportional to mass and square of the side lengths,

So moment of inertia of smaller equilateral triangles, $i$, (about perpendicular axis passing through their centroids) would be $\cfrac{1}{16}$ of the moment of inertia $I$ of the full triangle

So using parallel axis theorem, we can write

$I = 4 \times \cfrac{I}{16} + 3 \times \cfrac{M}{4} \times (\cfrac{a}{2 \sqrt{3}})^2$

Or, $I = \cfrac{1}{12} Ma^2$