calculate c factor