The integral of real or complex-valued functions of unbounded variation on a finite interval is defined using composition formulas and integration-by-parts rules for fractional integrals and Weyl derivatives. This integral is defined as
where and satisfy some fractional differentiability conditions in -spaces, and . If has bounded variation and is bounded and right- (or left-)continuous at -almost all points (or satisfies a suitable integrability condition), then this integral coincides with the classical Lebesgue-Stieltjes integral. In the special case of Hölder continuous functions and of summed order greater than 1 then the convergence of the Riemann-Stieltjes sums to the integral is proved. Furthermore, the integral as a function of the boundary is Hölder continuous of the same order as . The paper contains some applications of the above results to stochastic calculus, obtained by replacing by the trajectories of a Brownian motion . First it is proved that for adapted random -functions of fractional degree of differentiability greater than the integral exists and coincides with the classical Itô integral with probability one. For the more general class of adapted functions having fractional derivatives of all orders less than 1/2, the author proves an approximation result for the Itô integral by the integrals of a regularization of . These results are extended to anticipating random functions by means of the Wiener chaos expansion. In this case the integral defined in this paper is related with the forward integral, which can be expressed in terms of the Skorokhod integral and a complementary term involving the derivative operator [see D. Nualart and E. Pardoux, Probab. Theory Relat. Fields 78, No. 4, 535-581 (1988; Zbl 0629.60061)]. The application to pathwise defined stochastic integrals with respect to fractional Brownian motion is also discussed.