The difference between the actual value, Yi, and the predicted value resulting from the regression is the residual.
\widehat{\varepsilon_{ i }}= Y _{ i }-\widehat{ Y _{ i }}= Y _{ i }-\left(\widehat{ b }_0+\widehat{ b _1} X _{1 i }+\widehat{ b }_2 X _{2 i }+\ldots+\widehat{ b _{ k }} X _{ ki }\right)