ForHosting KIT · Finance & money

Retained earnings calculator

Opening retained earnings of 100,000, net income of 40,000 and dividends of 15,000 close the period at 125,000, a change of 25,000. Roll the balance forward for any reporting 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
Beginning retained earnings
100,000
Net income
40,000
Dividends
15,000
You get
Change
25,000
Ending retained earnings
125,000

Retained earnings is the cumulative profit a corporation has kept after distributing dividends to shareholders. Each reporting period the statement of retained earnings updates that running total with a three-term identity: ending retained earnings equals beginning retained earnings plus net income minus dividends paid. A net loss is simply negative net income and reduces the balance; a dividend of zero is a valid closed period with no distribution. Bookkeepers, accounting students, and small-finance teams need a deterministic calculator that rejects a missing or non-numeric input instead of silently treating a blank as zero.

What retained earnings measures and the three-term identity

Retained earnings is not cash sitting in a bank account and is not the same figure as current-period profit. It is the equity residual that accumulates undistributed earnings from the date the entity began, or from the last restatement, through the close of the current period. The roll-forward taught in every financial-accounting course is ending retained earnings equals beginning retained earnings plus net income minus dividends.

Beginning retained earnings is the closing balance brought forward from the prior period; it can be negative when the entity carries an accumulated deficit. Net income is the bottom line of the income statement for the current window and may be negative when the period is a net loss. Dividends are distributions charged against retained earnings in that same window: cash dividends in the simple identity, with stock dividends or other equity transfers folded in only if you already measured them as a reduction of this account.

Subtracting dividends from beginning retained earnings plus net income isolates the leftover equity that stays in the business. Worked example: a company that opened with one hundred thousand of retained earnings, earned forty thousand of net income, and paid fifteen thousand of dividends closes with one hundred twenty-five thousand, because one hundred plus forty minus fifteen is one hundred twenty-five. A second example: opening eighty thousand, a net loss of twelve thousand, and dividends of three thousand closes at sixty-five thousand.

Zero dividends is allowed: a growth-stage issuer can retain the entire profit. The identity does not revalue assets, apply prior-period adjustments as a fourth line, or split preferred versus common; fold those adjustments into the three inputs before you call. Keep all three figures in the same currency and the same reporting window so the ending balance is a true roll-forward rather than a mix of years.

Where a retained earnings calculator earns its keep

People who type retained earnings into a search box already know the equity account and want the closing balance, not a lecture that starts from the full statement of changes in equity. A publisher ranking for that short query is serving bookkeepers who have an opening RE total, a net-income line, and dividends declared, students who must fill the statement of retained earnings on an exam, and analysts who need a deterministic oracle that rejects a missing or infinite dividend figure instead of silently treating a blank as zero.

Closely held companies building a month-end notebook want the same beginning-plus-income-minus-dividends figure that appears in the equity section, without hand errors when currency decimals change. Failed validation does not consume balance. Pair this capability with a separate dividend-yield or working-capital tool when you need those identities; keep this surface focused on the closing retained-earnings balance that people mean when they search retained earnings.

Month-end equity close

Enter opening retained earnings, net income, and dividends declared to publish the ending equity residual without rebuilding the identity in a spreadsheet.

Dividend what-if without a full ledger

Hold beginning retained earnings and net income fixed, vary dividends, and read the implied ending balance before the board sets a distribution.

How do I calculate ending retained earnings?

Ending retained earnings equals beginning retained earnings plus net income minus dividends. Example: 100000 + 40000 − 15000 = 125000.

Can net income be negative?

The calculator returns the resulting ending balance instead of clamping at zero.

What if beginning retained earnings is an accumulated deficit?

The identity still holds: ending equals beginning plus net income minus dividends, which may stay negative.

Does this include stock dividends or additional paid-in capital?

No. The calculator applies the three-term identity only. Fold stock dividends already charged to retained earnings into dividends, and keep APIC on a separate equity line.

Are retained earnings the same as cash in the bank?

No. Retained earnings are an equity balance that accumulates undistributed profit since the company began, or since the last restatement. They are neither cash on hand nor the profit of the current period.

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/retained-earnings

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/retained-earnings \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"beginning_retained_earnings":100000,"net_income":40000,"dividends":15000}'
{
  "beginning_retained_earnings": 100000,
  "net_income": 40000,
  "dividends": 15000
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "fin.retained_earnings",
  "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.

Successful calls are billed at $0.002; invalid input is not charged.

Input contract, response shape, and validation

Example: beginning one hundred thousand, net income forty thousand, and dividends fifteen thousand yields change twenty-five thousand and ending retained earnings one hundred twenty-five thousand. Prefer bare numbers over formatted strings; currency marks, thousands separators, and trailing unit labels are not parsed. Absolute values above one quadrillion are rejected so intermediate sums stay finite. POST a JSON body with three required finite numbers in the same currency and the same reporting window. beginning_retained_earnings is the opening equity residual and may be negative when there is an accumulated deficit; aliases beginning_re, beginning, opening_retained_earnings, opening_re, bre, start_re, and beginning_balance are accepted so a ledger export does not need a rename step. net_income is the period bottom line and may be negative when the period is a net loss; aliases ni, income, profit, net_profit, net_earnings, and earnings are accepted. dividends is the amount charged against retained earnings during the window and may be zero when no distribution was made; aliases dividends_paid, dividend, d, and distributions are accepted. Each field may arrive as a JSON number or as a numeric string that matches a strict finite decimal pattern. Missing fields, empty strings, objects, arrays, infinities, and non-numeric text fail with invalid_input naming the field and are not billed. There is no clamp on the sign of the ending balance: a period that deepens a deficit is a successful result with a negative ending_retained_earnings figure. On success the body echoes rounded beginning_retained_earnings, net_income, and dividends, returns change as net income minus dividends, returns ending_retained_earnings as beginning plus that change, and includes a formula string restating the identity so a dashboard can print the definition next to the number. Pricing for a successful item is a flat $0.002.

Where a retained earnings calculator earns its keep

Classroom and certification courses that teach the statement of retained earnings need an endpoint that returns the ending balance and the period change and nothing else, so a grader can compare against a textbook key without this tool pretending to run a full general ledger. Keep requests small, pin the rounded ending_retained_earnings and change fields in tests, and you get reproducible equity roll-forwards for homework, exam generators, and lightweight close notebooks without standing up a full equity subledger.

Homework and statement-of-RE oracles

Students compute ending RE = beginning + net income − dividends by hand and compare against a deterministic result that rejects a non-finite input as invalid_input.

What does the retained earnings calculator cost?

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

Read the full KIT documentation →