Are all transferable credits considered in a GPA, even if they don't count towards your degree?

Are all transferable credits considered in a GPA, even if they don’t count towards your degree?
I have taken classes that are not required in the degree that I am pursuing. These classes are, however, marked as transferable by my community college. are they included in my GPA? Do they only include transferable classes that show up on assist or are required by the CSU for graduation?

I took Calculus and got an F. It is transferable but it is not required for graduation in the CSU that I wan’t to transfer to.

Thanks