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