The X-ray energy spectrum is crucial for image quality and dosage assessment in mammography, radiography, fluoroscopy, and CT which are frequently used for the diagnosis of many diseases including but not limited to patients with cardiovascular and cerebrovascular diseases. X-ray tubes have an electron filament (cathode), a tungsten/rubidium target (anode) oriented at an angle, and a metal filter (aluminum, beryllium, etc.) that may be placed in front of an exit window. When cathode electrons meet the anode, they generate X-rays with varied energies, creating a spectrum from zero to the electrons’ greatest energy. In general, the energy spectrum of X-rays depends on the electron beam’s energy (tube voltage), target angle, material, filter thickness, etc. Thus, each imaging system’s X-ray energy spectrum is unique to its tubes. The primary goal of the current study is to develop a clever method for quickly estimating the X-ray energy spectrum for a variety of tube voltages, filter materials, and filter thickness using a small number of unique spectra. In this investigation, two distinct filters made of beryllium and aluminum with thicknesses of 0.4, 0.8, 1.2, 1.6, and 2 mm were employed to obtain certain limited X-ray spectra for tube voltages of 20, 30, 40, 50, 60, 80, 100, 130, and 150 kV. The three inputs of 150 Multilayer Perceptron (MLP) neural networks were tube voltage, filter type, and filter thickness to forecast the X-ray spectra point by point. After training, the MLP neural networks could predict the X-ray spectra for tubes with voltages between 20 and 150 kV and two distinct filters made of aluminum and beryllium with thicknesses between 0 and 2 mm. The presented methodology can be used as a suitable, fast, accurate and reliable alternative method for predicting X-ray spectrum in medical applications. Although a technique was put out in this work for a particular system that was the subject of Monte Carlo simulations, it may be applied to any genuine system.