The gun salute system of the United States has changed considerably over the years. In 1810, the "national salute" was defined by the War Department as equal to the number of states in the Union--at that time 17. This salute was fired by all U.S. military installations at 1:00 p.m. (later at noon) on Independence Day. The President also received a salute equal to the number of states whenever he visited a military installation.
In 1842, the Presidential salute was formally established at 21 guns. In 1890, regulations designated the "national salute" as 21 guns and redesignated the traditional Independence Day salute, the "Salute to the Union," equal to the number of states. Fifty guns are also fired on all military installations equipped to do so at the close of the day of the funeral of a President, ex-President, or President-elect.
Today the national salute of 21 guns is fired in honor of a national flag, the sovereign or chief of state of a foreign nation, a member of a reigning royal family, and the President, ex-President and President-elect of the United States. It is also fired at noon of the day of the funeral of a President, ex-President, or President-elect.
Thank you so much for the information!