The electric drivetrain as part of the modern car is an extensive source of electromagnetic interference. In the case of an in-wheel electric motor, the main source of interference is the inverter. It converts the direct battery current to the alternating current, which is suitable to supply the motor. There are also many other devices installed in a vehicle, which can malfunction as part of the electromagnetic interference. These devices can be divided into three groups: drivetrain related devices, safety systems and entertainment systems. In case of safety systems, it is important, that they operate uninterrupted and in all conditions, otherwise the lives of passengers can be compromised. We have to ensure their electromagnetic compatibility in order to guarantee proper operation of all devices. To limit the propagation of the electromagnetic waves the inverter has to be shielded. The goal of this master thesis was the optimization of such an inverter shield. For our starting point we used an aluminium housing, which was also used for shielding and was removed from a prototype electric vehicle. We used a magnetic field probe to measure the magnetic field and calculate the damping of the shield. The optimization was done by using numerical analysis. To perform the calculations the finite element method was used. The model of the shield was designed on the basis of the test housing, whereas the size of the gap in the model was determined by the measurement results. Results showed that in the frequency range of up to 1 MHz only the material and the housing wall thickness affect the damping of the shield, while in the frequency range above 1 MHz, only the size of the gap is important. The test housing had several gaps and holes. To increase the damping of the shield, their number should be lowered. The material selection was appropriate, however the wall thickness could have been made thinner.