Catalyzes the oxidative decarboxylation of 6-phosphogluconate to ribulose 5-phosphate and CO(2), with concomitant reduction of NAD to NADH. 6-phospho-D-gluconate + NAD(+) = CO2 + D-ribulose 5-phosphate + NADH kcat is 23 sec(-1). Can use NAD or NADP, but has a clear preference for NAD in vivo. Carbohydrate degradation; pentose phosphate pathway. Homotetramer. Belongs to the 6-phosphogluconate dehydrogenase family.