To calculate the factorial of a number in C++, you can use a for loop to multiply the numbers from 1 to the given number. Initialize a variable with 1 and multiply it with each number in the loop.