The main objective of this paper is to study the efficiency of ramjet engine by optimizing the inlet spike geometry. The engine inlet is of primary importance for all air-breathing propulsion engines. Its major function is to collect the atmospheric air at free stream Mach number, slow it down and to compress it efficiently. The geometries used here are planar with different Mach numbers 1.5, 2, 3 and 3.5. The first inlet has a cone of with four types of different half cones angles of 14°, 15°, 16° and 17° respectively. In the second modified inlet, a hole of 0.3 mm is made at mid-section of the cone on 2 symmetrical sides of the cone. It is observed that the hole allows the inflow of oblique shock i.e., the oblique shock is absorbed through the holes, followed by normal shock which then expands behind the length of the cone thus increasing the mass flow rate for adequate combustion. In the last modified inlet, the cone is step ended due to which the mass flow converges as it flows along the slope of the steps. The designing is done in solid works and the analysis of inlet spike is done in 2-D with the help of ANSYS software. It is finally concluded that the out of the four different cone angles analysed, 170 cone angle for M = 1.5 showed least pressure recovery and the same geometry is analysed for two different modified spikes where the cone with hole (cavity) showed huge rise pressure for the same conditions.