Abstract The Kubo-Greenwood (KG) formula is often used in conjunction with Kohn-Sham (KS) density functional theory (DFT) to compute the optical conductivity, particularly for warm dense mater. For applying the KG formula, all KS eigenstates and eigenvalues up to an energy cutoff are required and thus the approach becomes expensive, especially for high temperatures and large systems, scaling cubically with both system size and temperature. Here, we develop an approach to calculate the KS conductivity within the stochastic DFT (sDFT) framework, which requires knowledge only of the KS Hamiltonian but not its eigenstates and values. We show that the computational effort associated with the method scales linearly with system size and reduces in proportion to the temperature unlike the cubic increase with traditional deterministic approaches. In addition, we find that the method allows an accurate description of the entire spectrum, including the high-frequency range, unlike the deterministic method which is compelled to introduce a high-frequency cut-off due to memory and computational time constraints. We apply the method to helium-hydrogen mixtures in the warm dense matter regime at temperatures of \textbackslashsim60\textbackslashtext\kK\ and find that the system displays two conductivity phases, where a transition from non-metal to metal occurs when hydrogen atoms constitute \textbackslashsim0.3 of the total atoms in the system.