This article addresses the derivation and analysis of an optimal quadrature formula for numerical integration of fractional integrals in the Hilbert space W 2 ( 2 , 1 ) ( t , 1 ) , where functions φ with prescribed properties reside. The quadrature formula is expressed as a linear combination of function values and their first-order derivative at equidistant nodes in the interval [ t,1]. The coefficients are determined by minimizing the norm of the error functional in the dual space W 2 ( 2 , 1 ) ∗ ( t , 1 ) . The error functional is defined as the difference between the integral of a function over the interval and the quadrature approximation. Key results include explicit expressions for the coefficients and the norm of the error functional. The optimization problem is formulated and solved, leading to a system of linear equations for the coefficients. Analytical solutions of the system are obtained, providing an explicit expression for the optimal coefficients. Fractional integrals of several functions are numerically calculated with the constructed optimal quadrature formula, and the convergence with the exact value of the integral is analyzed in numerical experiments.