An image forming apparatus which is provided with a casing, a panel unit provided with at least one of an operation unit acquiring an operation to control the image forming apparatus and a display unit, a discharge tray configured to receive a recording medium discharged from the casing. The casing has a first cover arranged above an image forming unit and constituted at least a part of an upper surface of the casing. The first cover includes a tray part which is at least a part of the discharge tray, a surrounding part configured to surround the tray part. The panel unit is arranged to be inserted in the surrounding part.