Profit calculator
Revenue of 125,000 minus costs of 87,500 leaves a profit of 37,500. Enter both totals for the same period and currency and get the signed amount, negative when the period ran at a loss. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Total revenue
- 125,000
- Total costs
- 87,500
- Profit
- 37,500
Accounting profit is the residual after every cost of the period is taken off total revenue. Operators, bookkeepers, freelancers, and product teams reach for a profit calculator when they need that residual as a signed amount rather than a margin percentage or a tax-adjusted earnings line. This profit calculator takes two finite numbers in one currency — total revenue and total costs — subtracts costs from revenue, and returns the profit amount. The result is negative when costs exceed revenue, which is a legitimate loss, not an error.
How profit turns total revenue and total costs into a signed residual
Accounting profit for a period is the signed residual after every cost of that period is taken off total revenue in one currency. A period with one hundred twenty-five thousand of revenue and eighty-seven thousand five hundred of costs prints profit of thirty-seven thousand five hundred. A period whose costs exceed revenue prints a negative profit: forty thousand of revenue and fifty-five thousand of costs prints negative fifteen thousand, which is a loss, not an error and not an absolute value.
Zero revenue or zero costs is a legitimate outcome and is not an error: a pre-revenue month or a period with no recorded spend still has a profit figure, often negative or equal to revenue. Negative revenue or negative costs are accepted as finite numbers because returns, credits, or restatements can print those signs; the difference follows them instead of hiding behind an absolute value.
This calculator does not compute a profit-margin percentage, does not compute EBIT or EBT, does not split cost of goods sold from operating expense, does not subtract income tax as a separate line, and does not convert currencies. You supply two finite numbers that already share one period and one currency; the calculator subtracts them and rounds profit half-up to two decimal places so goldens compare byte-for-byte across runtimes.
This is going-in accounting profit from the two-line identity, not a margin view, not a pretax earnings line, and not a cash-from-operations number.
What you can do with it
Monthly close residual
Turn last period's total revenue and every cost into one signed profit line before you open a full income-statement model.
Freelance and small-shop months
Drop invoice totals and a cost roll-up into two fields to see whether the month made money, including a negative profit on a loss.
FAQ
How is profit calculated?
Money amounts round half-up to two decimal places.
What if costs exceed revenue?
The calculator returns a negative profit. A loss is a legitimate outcome, not an error and not an absolute value. Example: forty thousand of revenue and fifty-five thousand of costs yield profit of negative fifteen thousand.
Is this a profit margin calculator?
A profit-margin tool, a gross-margin tool, and an EBIT or EBT identity start from different lines and answer different questions.
What happens if a field is missing or not a finite number?
NaN, Infinity, empty strings, and missing fields are rejected and are not billed.
What should I include in total costs?
Every cost of the same period, already added into one figure: cost of goods sold, wages, rent, software, interest, depreciation, marketing and any other outflow. Whatever you leave out will inflate the profit.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/profit \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"total_revenue":125000,"total_costs":87500}'const res = await fetch("https://api.kit.forhosting.com/fin/profit", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"total_revenue": 125000,
"total_costs": 87500
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/profit",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"total_revenue": 125000,
"total_costs": 87500
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/profit", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"total_revenue":125000,"total_costs":87500}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"total_revenue":125000,"total_costs":87500}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/profit", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"total_revenue": 125000,
"total_costs": 87500
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.profit",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Any input that is missing, empty, or not a finite number fails with invalid_input and is not billed.
How profit turns total revenue and total costs into a signed residual
This profit calculator uses the identity profit equals total_revenue minus total_costs. total_revenue is the top line you already closed: net sales, fees, subscriptions, or other inflows rolled into one finite number. total_costs is every cost of that same period rolled into one finite number — cost of goods sold, wages, rent, software, interest, depreciation, marketing, and any other outflow you have already combined.
Input contract, response shape, and error behaviour
Zero and negative amounts are allowed: a pre-revenue year, a credit, or a restatement still produce a finite profit rather than an error. Example: one hundred twenty-five thousand of revenue and eighty-seven thousand five hundred of costs yield profit of thirty-seven thousand five hundred. Example of a loss: forty thousand of revenue and fifty-five thousand of costs yield profit of negative fifteen thousand. Keep both fields finite and pin the rounded profit in tests so a worksheet and a script never disagree on the residual. POST a JSON body with two required finite numbers in one currency. total_revenue is the period top line; aliases revenue, sales, and turnover map to the same field so a worksheet can keep its column names. total_costs is the period total of every cost you want subtracted from that top line; aliases costs, total_cost, expenses, and total_expenses are accepted. Each numeric field may arrive as a JSON number or a numeric string. Missing fields, empty strings, and non-finite values — NaN, Infinity, or text that does not parse as a number — fail with invalid_input naming the field. Those failures are not billed. On success the body echoes total_revenue and total_costs, then reports profit as the difference rounded half-up to two decimal places, together with a formula string restating the identity. Pair the JSON with your own rule for which cost definition matches the period — a contribution-margin workbook may omit fixed overhead, while a full P&L includes it — because this endpoint subtracts the two numbers you send; it does not rebuild the statement, choose a reporting convention, convert currencies, or compute a percentage.
Where a profit calculator earns its keep
Operators screening a monthly close use a profit calculator to turn last period's total revenue and the sum of every cost into one comparable residual before they open a full income-statement model. Freelancers and small shops drop invoice totals and a cost roll-up into the same two fields to see whether the month made money, including the honest negative when costs exceeded sales. Failed validation does not consume balance. Keep both fields finite, pin the rounded profit in tests, and you get a reproducible signed residual for teasers, close checklists, and edge workers without standing up a general ledger of your own. The browser tool is free; the API path is the same algorithm billed at $0.002 per successful call so a worksheet and a script never disagree on the residual.
Integration use cases
Dashboards and CI fixtures
Pin profit from two finite numbers in automations that must match the free browser widget without calling an accounting engine.
Technical questions
What does the profit calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.