The paper presents mathematical models and solution algorithms for RC pile design, through scanning soil stratums from top to downwards with an interactive scanner band. The equilibrium of transferred loads from the superstructure, friction forces and tip bearing forces are considered for the design, which leads to optimum pile length. The most important contribution of this research for designers is supplying an efficient tool to obtain optimum pile length and reinforced concrete design of pile foundation systems. A program package has been developed in MATLAB depending on the proposed algorithm. Soil behaviors depending on external effects, active and passive zone distributions are considered. All possible effects in all freedom degrees are taken into account in design process. Stress and strain distributions due to axial loads, bending moments, shear forces and torsional moments may be monitored. The optimum pile length, cross section dimension and reinforcement details may be found by using developed algorithm.