The Substitution box (\(S\)-box) plays an important role in a block cipher as it is the only nonlinear part of the cipher in most cases. \(S\)-box \(S\) can be considered as a vectorial Boolean function consisting of \(m\) individual Boolean functions \(f_1,f_2,\dots,f_m\), where \(f_i: GF (2^n)\to GF (2)\) and \( f_i(x)=y_i\) for \(i=1,2,\dots,m\). These functions are called coordinate Boolean functions of the \(S\)-box \(S\). To avoid various attacks on the ciphers and for efficient software implementation, the coordinate Boolean functions of \(S\)-boxes are required to satisfy a lot of properties, for instance being a permutation defined on the fields with even degrees, with a high nonlinearity, a low differential uniformity and a high algebraic degree, etc. However, it seems very difficult to find an \(S\)-box with the coordinate Boolean functions to satisfy all the criteria. The \(S\)-box with low algebraic degree of the coordinate Boolean functions is vulnerable to many attacks such as linear and differential cryptanalysis, for instance higher-order differential attacks, algebraic attacks or cube attacks. In this paper we propose an algorithm for improving algebraic degree of the $S$-box coordinate Boolean functions while not affecting its other important properties. The algorithm is based on affine equivalence transformation of the \(S\)-boxes.