The factory cost of producing goods is made up of prime cost and factory overhead. Prime cost includes direct costs like raw materials, labor, and other direct expenses incurred during production. Factory overhead, on the other hand, includes indirect costs such as rent, utilities, and other expenses that cannot be directly attributed to the production of goods. Therefore, the total cost of producing goods in a factory is the sum of the prime cost and factory overhead.