We introduce a stochastic fractional calculus. As an application, we present a stochastic fractional calculus of variations, which generalizes the fractional calculus of variations to stochastic processes. A stochastic fractional Euler–Lagrange equation is obtained, extending those available in the literature for the classical, fractional, and stochastic calculus of variations. To illustrate our main theoretical result, we discuss two examples: one derived from quantum mechanics, the second validated by an adequate numerical simulation.