In this study, we used the ab-initio pseudo potential plane wave (PP-PW) approach based on density functional theory (DFT) to investigate the effect of porosity of porous silicon (PSi) on its elastic properties. The influence of porosity: 3.12%, 15.56%, 28.12%, and 40.62% on its elastic properties realized by using supercell model was studied. The results obtained are compared to those acquired experimentally by nanoindentation. The results showed that porosity has a great effect on its elastic properties and indicated that the latter decreased with increasing porosity of PSi. A comparison between the Young's modulus, bulk modulus and hardness calculated with DFT for each porosity, those obtained experimentally, and that collected from the literature reflects globally similar behavior.