Catalyzes the reversible transfer of a two-carbon ketol group from fructose-6-phosphate or sedoheptulose-7-phosphate to glyceraldehyde-3-phosphate to yield xylulose-5-phosphate and erythrose-4-phosphate or ribose-5-phosphate, respectively. D-glyceraldehyde 3-phosphate + D-sedoheptulose 7-phosphate = aldehydo-D-ribose 5-phosphate + D-xylulose 5-phosphate Binds 1 Mg(2+) ion per subunit. Can also utilize other divalent metal cations, such as Ca(2+), Mn(2+) and Co(2+). Binds 1 thiamine pyrophosphate per subunit. Carbohydrate biosynthesis; Calvin cycle. Homodimer. Belongs to the transketolase family.