Examples
Examples
Try the starting example
- JSON Expenses [category,approved amount currency,supplied category cap currency] (USD)
- [["rail",120,150],["hotel",200,160]]
- Total reimbursement cap (USD)
- 250
- Allowed by category (USD)
- [["rail",120],["hotel",160]]
- Total reimbursable (USD)
- $250.00
- Excluded amount (USD)
- $70.00
Try another scenario
- JSON Expenses [category,approved amount currency,supplied category cap currency] (USD)
- [["rail",120,150],["hotel",200,160]]
- Total reimbursement cap (USD)
- 300
- Allowed by category (USD)
- [["rail",120],["hotel",160]]
- Total reimbursable (USD)
- $280.00
- Excluded amount (USD)
- $40.00
Calculation method
Calculation method
Allowed by category (USD)
J([[r[0],min(r[1],r[2])] for r in a])
Total reimbursable (USD)
min(b,sum(min(r[1],r[2]) for r in a))
Excluded amount (USD)
sum(r[1] for r in a)-min(b,sum(min(r[1],r[2]) for r in a))
Symbols and units
- a
- JSON Expenses [category,approved amount currency,supplied category cap currency] (USD)
- b
- Total reimbursement cap (USD)
Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.
Calculation steps and notation
sum(list) adds all entries in the list.
Assumptions & limits
Assumptions & limits
- Supplied approval and caps only. One row per category; expenses must already exclude ineligible items. Supported limits: All numeric inputs must be finite. Only the explicitly described mathematical scenario is supported.
Are these inputs private?
These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.