Since the fractional Brownian motion is not a semi–martingale, the usual Ito calculus cannot be used to define a full stochastic calculus. However, in this work, we obtain the Itô formula, the Itô–Clark representation formula and the Girsanov theorem for the functionals of a fractional Brownian motion using the stochastic calculus of variations.