Goi (Fifth Rank) was a rank corresponding to Kokushi (provincial governor), Chinjufu shogun (Commander-in-Chief of the Defense of the North) and Shodaibu (aristocracy lower than Kugyo) in the ritsuryo system.
律令制下において五位は国司や鎮守府将軍、諸大夫に相当する位であった。