The War of 1812 flag
The former Territory of Orleans was admitted to the Union as the 18th state on April 30, 1812, but the United States flag during the War of 1812 had 15 stars and stripes. Why not 18 stars?
Vermont joined the Union in 1791 and Kentucky in 1792, so on Jan. 13, 1794, Congress passed an act stating that the flag after May 1, 1795, would have 15 stars and 15 stripes. This flag was used for the next 23 years, including throughout the War of 1812, until Congress in 1818 passed an act stipulating that after July 4 that year the flag would have 13 stripes and a star for each state. By then Indiana and Alabama had entered the Union, in 1816 and 1817 respectively, so the flag had 20 stars, but only for a few months, because Illinois was admitted in December 1818 and Mississippi in 1819.