IUPAC names carboxylic acids by replacing the ending -ane of the alkane with the same number of carbons with -oic .
When the acid has substituents, the longest chain is numbered by giving the lowest locant to the carbon of the acid group. Carboxylic acids have priority over other groups, which are named as substituents.
Carboxylic acids also have priority over alkenes and alkynes. Molecules with two acid groups are named with the ending -dioic .
When the acid group is attached to a ring, the cycle is taken as the main chain and ends in
-carboxylic.