The distribution of concentration of cosmogenic nuclides in fault scarps is used to determine slip histories. The complicated part is the calculation of cosmic radiation shielding by the escarpment body and the overlying wedge of the colluvial sediment. To improve reconstruction of earthquake ages and slip histories, we developed a mathematical model and corresponding MATLAB ® code for computation of shielding factor profiles in fault scarp geometry. In the model, cosmic radiation received by a point of footwall is represented as unit rays attenuated exponentially in scarp geometry. This approach allows producing very precise results both for the fault scarp and the sloped surface. The code is presented as a m-function and as a stand-alone program with a user-friendly interface. Shielding factors are calculated by the code for fast neutrons or for muons and include all general shieldings: topographical, sloped surface, fault scarp surface, colluvium cover, snow cover and self-shielding. A variety of input parameters enables one to adjust the model and the code to almost all possible shielding cases. The code and stand-alone version are provided as supplementary materials and equipped with help and explanatory notes.