Description
expenditure = sum(quantity*price); feasible uses expenditure <= budget; remainingBudget = budget-expenditure.
A budget constraint links prices, quantities and a monetary resource. An axis intercept, residual or local share contribution describes one aspect of that constraint and does not independently solve preferences or determine actual affordability.
expenditure = sum(quantity*price); feasible uses expenditure <= budget; remainingBudget = budget-expenditure.
When to use this tool
Use Economics: Utility Budget Feasibility Basket when checking one supplied basket, budget-line or resource-allocation term.
How to use the tool and how it works
- Enter quantities, prices, budget. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Require equally long nonnegative quantities and prices and nonnegative budget. expenditure = sum(quantity*price); feasible uses expenditure <= budget; remainingBudget = budget-expenditure.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| quantities | Quantities | Required. Array of finite number. Implementation limit: 128 items. |
| prices | Prices | Required. Array of finite number. Implementation limit: 128 items. |
| budget | Budget | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the named calculated members below. | Required. Object. |
| result.expenditure | Expenditure | Calculated result member: number. |
| result.feasible | Feasible | Calculated result member: boolean. |
| result.remainingBudget | Remaining Budget | Calculated result member: number. |
{
"input": {
"quantities": [
2,
3
],
"prices": [
4,
1
],
"budget": 10
},
"output": {
"result": {
"expenditure": 11,
"feasible": false,
"remainingBudget": -1
}
}
} Limitations and assumptions
- Prices and budget share a currency and quantity bases must match. This tests one basket, not utility maximization, affordability standards or available market purchases.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the complete feasible set and an appropriate choice model for optimization, rationing or welfare questions.
References
Similar or alternative tools
- Quasilinear Demand Budget Residual
numeraireResidual = budget-price*chosenQuantity.
- Budget Share Compensated Change
initialExpenditure = initialShare*expenditure; shareContribution = price*suppliedCompensatedQuantityChange/expenditure.