Calculating Profit Margins

Calculating Profit Margins

Any ideas on how to accomplish the following in CRM?

Factors:

        Sales Order Total
-       
        Purchase Order 1 Total
-
        Purchase Order 2 Total
-
        Shipping Cost (custom currency field)
-
        Credit Card Fees (sale total * % based on type of card) (formula field)
=
        Profit Margin

My guess is that it would have to be a Zoho Creator App utilizing API.