If 14 students represent \( \frac{2}{3} \) of the class, we can set up an equation to solve for the total number of students in the class.
Let \( x \) be the total number of students in the class. We can write the equation as:
\[ \frac{2}{3}x = 14 \]
To solve for \( x \), multiply both sides by \( \frac{3}{2} \):
\[ x = 14 \times \frac{3}{2} \]
Calculating that gives:
\[ x = 14 \times 1.5 = 21 \]
Therefore, the total number of students in the class is \( \boxed{21} \).