ForHosting KIT · Finance & money

Budget calculator

An income of 5,000 minus 2,700 spent on housing, food, transport, utilities and subscriptions leaves 2,300: a surplus. List your own income and expenses by category to see what remains for the period. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Income
5,000
You get
Expense count
5
Total expenses
2,700
Remaining
2,300
Status
surplus

This remaining budget calculator subtracts a list of categorized expenses from total income and reports whether the period closes in surplus or deficit. Send a finite non-negative income figure and at least one expense row with a category label and an amount; the engine sums every amount, computes remaining equals income minus that total, and classifies the sign as surplus, deficit, or balanced. There is no inflation path, tax table, or currency conversion—only deterministic subtraction you can pin in tests and display next to a category breakdown.

What remaining budget means and how surplus or deficit is signed

Remaining budget is the leftover after every listed spend is taken out of income for the same period: a month, a paycheck cycle, or a project envelope. This calculator does not forecast inflation, convert currencies, or apply tax tables. It reads a finite non-negative income figure and a list of categorized expense rows, each with a category label and an amount in the same currency, then applies the closed identity remaining equals income minus the sum of those amounts.

A positive leftover is a surplus; a negative leftover is a deficit whose magnitude is the shortfall; a zero leftover is balanced. Category labels travel through the response so a household, a classroom, or a script can show how much of the spend sat in Housing versus Food versus Transport. Share is the row amount divided by total expenses, or zero when the spend total is zero.

Income itself must be non-negative and finite.

Where a remaining-budget calculator earns its keep

Households use a remaining budget calculator when a paycheck lands and the rent, groceries, commute, utilities, and subscriptions need a single leftover number before discretionary spend is planned. Students meet the same identity in personal-finance units that ask whether a monthly envelope is in surplus or deficit given a labeled spend list. Teachers can generate answer keys for modest income figures without trusting opaque apps that mix savings-rate rules or inflation into a simple subtraction.

Coaching tools use the surplus or deficit amount next to a progress bar so a learner sees leftover cash, not a wall of raw rows.

Household paycheck leftover

Subtract rent, food, transport, and bills from take-home pay to see whether the month closes in surplus or deficit.

Classroom envelope checks

Give students a labeled spend list and a known income so they can verify remaining budget against the surplus or deficit key.

How is remaining budget calculated?

remaining = income − sum of every expense amount. A positive leftover is surplus; a negative leftover is deficit (reported as a positive shortfall); zero is balanced.

What happens if an expense amount is negative?

Expense values cannot be negative in this calculator, and failed validation is not billed.

Which fields do I send?

Each expense row needs a non-empty category and a non-negative amount.

What does status mean in the response?

status is surplus when remaining is positive, deficit when remaining is negative, and balanced when remaining is exactly zero after two-decimal rounding.

Does the budget calculator show how much goes to each category?

Yes. Next to each category you get its share of total spending. In the example, housing at 1,800 out of 2,700 is two thirds of everything spent, which makes the biggest pressure on the budget easy to spot.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/fin/budget

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/fin/budget \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"income":5000,"expenses":[{"category":"Housing","amount":1800},{"category":"Food","amount":450},{"category":"Transport","amount":220},{"category":"Utilities","amount":180},{"category":"Subscriptions","amount":50}]}'
{
  "income": 5000,
  "expenses": [
    {
      "category": "Housing",
      "amount": 1800
    },
    {
      "category": "Food",
      "amount": 450
    },
    {
      "category": "Transport",
      "amount": 220
    },
    {
      "category": "Utilities",
      "amount": 180
    },
    {
      "category": "Subscriptions",
      "amount": 50
    }
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "fin.budget",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Negative expense values are rejected with invalid_input because a spend line cannot be less than zero in this model. The same pure arithmetic powers the free browser tool and the API path, so a household worksheet and an automation script never disagree on the leftover.

What remaining budget means and how surplus or deficit is signed

Negative expense values are outside the model: a spend line cannot be less than zero, so the engine fails with invalid_input naming the offending row instead of silently flipping a refund into a credit.

Input contract, rejected rows, and the shape of a successful response

Each object needs category, a non-empty string after trim, and amount, a finite non-negative number. Missing income, a missing or empty expenses list, a missing category, or more than two hundred rows also fail. Money fields are rounded to two decimal places; shares use twelve. Optional output keys are omitted rather than set to null. POST a JSON body with two required fields. income is the total money available for the period; aliases total_income, salary, and revenue are accepted so spreadsheets and typed forms can reuse the same contract. expenses is a non-empty array of one to two hundred objects; aliases items, costs, and spending map to the same list. Amount aliases value and cost are honored on each row. Numeric strings that parse as finite decimals are accepted; empty strings, NaN, and Infinity fail with invalid_input naming the field. If any expense amount is negative the request is rejected with a message that expense values cannot be negative—that is the hard contract of this calculator, and those failures are not billed. On success the body echoes income, expense_count, and the cleaned expense rows with share; it reports total_expenses, remaining, status (surplus, deficit, or balanced), surplus (remaining when positive, otherwise zero), deficit (the absolute shortfall when remaining is negative, otherwise zero), and a formula string.

Where a remaining-budget calculator earns its keep

On this page the work runs entirely in the browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. Pair the free interactive run with the priced, identical API when you move from a worksheet demo to an automated pipeline without changing the mathematical result or re-implementing the subtraction yourself.

Deterministic budgeting fixtures

Seed CI and product calculators with stable remaining, surplus, and deficit values from known income and categorized expenses.

What does the budget calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →