In this paper, a multiband compact microstrip patch antenna for different communication frequencies has been presented. The proposed design of the microstrip patch antenna consists of a slotted patch, a quarter-wave feed line, and a ground with a cross-edge slot. The antenna can operate from 2.1 GHz to 3.4 GHz with a bandwidth of 1.3 GHz; this band corresponds to applications such as Mobile WiMax (2110 MHz-2200 MHz, 2300 MHz-2400 MHz, 2500 MHz-2690 MHz), Bluetooth (2400 MHz-2497 MHz), and RFiD. (2400 MHz -2483 MHz). The higher band, 4.7 GHz to 7.4 GHz, covers C-band, WLAN, and sub-6GHz 5G applications and has a gain factor of about 2.15 dB. The antenna is fabricated, and measurements of the radiation pattern and return loss are made. The comparison of observed results with those from simulations reveals excellent symmetry. Furthermore, the 70× 40 mm² size of the proposed antenna makes it appropriate for use in lower 5G bands.