A method for calculating the product of two B-spline functions is presented. The product is computed by solving a linear system. The coefficient matrix of the system is a Gramian, which guarantees that the system has a unique solution. Every element of the coefficient matrix and the righthand vector of the system is an inner product of B-splines. The inner product can be computed accurately by making use of numerical methods.