To calculate Cost-Per-Action (CPA), you take the total campaign spend in a given period and you divide it by the total amount of actions or conversions in that same period.
EXAMPLE: Tedy ran a Verizon campaign last month. His DSP total media spend was $10,000 and he got 164 conversion. His CPA for last month for that Verizon campaign was $60.98 (10,000 divided by 164).