SUBLEDGER-Logo-Large-RGB-Black.jpg

Accounting for Developers 102

By John McKee and Tom Mornini

In Accounting for Developers 101 we discussed the history of accounting, why accounting is essential, the accounting equation, debit & credit, balance, accounts and journal entries. Those basic building blocks are enough to track what an business has and is owed and what they owe. In this post we want to cover how accounting handles the reporting of that information, as well as how to track profit/(loss).

Reports and the Chart of Accounts

Accounting reports, commonly described as financial reports, are designed to measure and track the financial state of a business. In developer terms they are hierarchical aggregates of individual account balances.

There are three major accounting reports:

  1. Balance Sheet: statement of financial position, includes every account
  2. Income Statement: a subset of the Equity section of the Balance Sheet
  3. Statement of Cash Flows: a subset of the Balance Sheet affecting cash

The structures of the standard reports are rigidly fixed at the top, with increasing flexibility at each lower layer progressing toward individual accounts, which are leaves at the bottom of the hierarchy and should be entirely unique to each business.

Reports should be tailored to deliver the operational information needed to measure performance effectively. The hierarchical structure of the Balance Sheet and Income Statement are commonly known to accountants as the Chart of Accounts.

Accountants and accounting software typically use a structured account numbering system to identify accounts. The numbering aids in identifying where an account exists in the hierarchy and is extremely convenient for auto-completing accounts during keyboard entry.

In this primer we chose to ignore account numbers because our chart of accounts is simple enough to not require them, and we feel that they'd just add noise to the higher level concepts we're describing.

Balance Sheet

The balance sheet is the most comprehensive accounting report. It shows the financial state of the company for a particular moment in time and the balance of all transactions the business has performed from inception until the date of the report.

The balance sheet is a visualization of the accounting equation, rendered vertically:

Assets (debit normal)

=

Liabilities (credit normal)

+

Equity (credit normal)

This table that summarizes several previous tables and includes everything required to understand the balance sheet.

BALANCE SHEET DEFINITIONS

Assets

Liabilities

Equity

Debit Normal Balance

Credit Normal Balance

Credit Normal Balance

What the Business Has
and Expects to Receive

What the Business
Owes to Vendors and Customers

What the Business Owes to Shareholders

cash on hand,

cash in the bank,

inventory,

accounts receivable

accounts payable,

loans payable,

taxes collected,

cash collected for products and services not yet delivered

investment into company,

retained earnings

(lifetime non-distributed profit/(loss))

The Accounting-Contra Affair

The general rule to help remember account normal balances is that accounts on the left side of the Assets = Liabilities + Equity equation have debit normal balances and accounts on the right side of the equation have credit normal balances.

This rule is meant to be broken. Accounts that violate this rule, i.e. accounts that are expected to carry abnormal balances, are known as contra-accounts. Common contra-accounts include the contra-asset account accumulated depreciation, and the contra-income accounts returns, allowances, discounts.


SAMPLE LEMONADE STAND BALANCE SHEET

Assets

1,705.00

  Cash

1,405.00

  Inventory Lemons

100.00

  Inventory Sugar

100.00

  Inventory Cups

100.00

Liabilities

200.00

  Notes payable

100.00

  Accounts payable

100.00

Equity

1,505.00

  Common Stock

1,450.00

  Retained earnings

55.00

Let’s translate the balance sheet back into equation form:

Assets(1,705) = Liabilities(200) + Equity(1,505)

which simplifies to:

Assets(1,705) = (Liabilities + Equity)(1,705)

Note that since Assets are debit normal, and Liabilities and Equity are credit normal, this can be reduced further to:

debit(1,705) = credit(1,705)

Hence the name Balance Sheet!


Income Statement, Net Income, Net Profit, and Profit/(Loss)

Whether a business operates at a profit or loss is very important to entities. As such there's a dedicated report called the income statement.

Income accounts are credit normal balance, and expense accounts are debit normal balance. When combined they are known interchangeably as net income, net profit and perhaps most accurately, profit/(loss): profits have more credit than debit, and losses have more debit than credit. Therefore, losses will be reported in parenthesis.

Let's look at this in more detail:

Profit/(Loss) = Incomes + Expenses

Confused? How can Profit equal Income PLUS Expense? Because Income and Expense accounts have opposite normal balances:

Profit/(Loss)(credit normal) = lncomes(credit normal) + Expenses(debit normal)

Remember from Accounting for Developers 101, that debit and credit are opposite of each other. Profit/(Loss) is credit normal, so when incomes have more credit than expenses have debit, that constitutes a Profit, whereas if expenses have more debit than incomes have credit, that consitutes a (Loss).

INCOME STATEMENT SAMPLE

Income Statement for the month ending July 31, 2014

Profit/(Loss)

55.00

  Incomes

100.00

    Sales

100.00

  Expenses

45.00

    Lemon COGS

20.00

    Sugar COGS

15.00

    Cup COGS

10.00

If you're thinking "shouldn't the expenses balances have parenthesis around them?" you're well on your way to understanding accounting! In our humble opinion, accounting reporting has some serious inconsistencies in presentation that should be eliminated. Since our mission is to explain how accounting works today, we'll leave that discussion for Accounting for Developers 103.

Cash -vs- Accrual Basis and The Matching Principle

There are two accounting bases, cash and accrual. Cash basis, while better than no accounting at all, is radically inferior to accrual basis.

Accrual basis uses what is known as the matching principle to record matching income and expenses at transaction time regardless of when payment is received for the income and payment is made for the expenses. This is critical to accurately measure financial performance and be able to make these measurements for a specific moment in time.

Consider the case of a lemonade stand. In accrual accounting, no expenses are recorded at the time lemons, cups or sugar are purchased. Instead, an entry is made that cash was converted to inventory of those items.

When a sale is made a journal entry records a reduction in inventory balanced by an increase in expenses, and an increase in income balanced by an increase in cash. Somewhat magically (as in Arthur C. Clarke's third Law: any sufficiently advanced technology is indistinguishable from magic) debit and credit always balance!

If the sale was made "on account", a journal entry records the same reduction in inventory balanced by an increase in expense, and an increase in income balanced by an increase in accounts receivable.

Accrual basis is superior to cash basis in that it records incomes and expenses when they are earned and expended, which is commonly asynchronous to cash transfer.

If the lemonade stand used cash basis, and purchased 6 months of sugar to gain bulk-pricing, the entire expense would be recorded the day the sugar was purchased, and no further expenses would be recorded until it was time to repurchase sugar, preventing any sort of month over month analysis.

If, instead, the lemonade stand used accrual basis, when the 6 months of sugar was purchased, it would make an entry describing cash being spent on inventory. Then, when each sale was made, it would reduce inventory and increase income, recording the information required for useful analysis.

Cash basis makes fewer, larger entries and accrual takes those same entries and breaks them down into smaller entries applied more frequently. Given an infinite time horizon, the final results are identical: debit must equal credit! Accrual records finer-grained information which is more useful for analysis.

Cash basis makes it very difficult to measure how a business is actually performing, and makes historical comparisons far less useful. Consider the case of a yearly, pre-paid insurance policy due every January. Does January have higher expenses than February through December? Accrual recognizes that January has increased cash usage, but that the monthly insurance expense is roughly equal (depending on whether you're accruing daily or monthly) by accruing for it over the course of the year.

Many developers unfamiliar with accounting believe that businesses exist in one of two states:

  1. profitable and increasing cash: sustainable, nirvanah
  2. unprofitable and decreasing cash: unsustainable, immediate hellish nightmare

This misconception goes to the core issue with cash basis. Once you grok accrual, it becomes clear that a business can exist in four states:

  1. profitable and increasing cash: sustainable, nirvanah
  2. profitable and decreasing cash: sustainable, requires cash infusion
  3. unprofitable and decreasing cash: unsustainable, immediate hellish nightmare
  4. unprofitable and increasing cash: a dangerous mirage, mind the iceberg!

State B is an ideal profile for taking on debt and/or venture capital investment. Having high-quality accrual accounting that proves that you're in state B greatly improves your likelihood of raising the cash you need to continue to grow your business.

The Accounting Cycle

The business owner chooses the period that she/he wants to track net income and have historical comparisons available by. Common periods are monthly, quarterly and yearly. The shorter the period, the more frequently management can judge the results of their efforts and make adjustments as required.

At the end of a period, a process known as closing the books (or simply closing in accounting vernacular) is performed. While commonly described as a single process, it is really composed of several steps:

  1. Account balances are reconciled (checked and adjusted to match reality). This involves taking inventory and communicating with all departments of the company (typically by spreadsheet), and with vendors, customers, payment processors and banks via documents known as statements. Adjusting journal entries created, as required, to increase the accuracy of the accounts.
  2. The income statement is generated.
  3. A single (ideally) or series (typically) of journal entries are made that zero the balances of all income statement accounts and transfers the net income to the balance sheet, typically into the Retained Earnings account, leaving income statement account balances at zero, ready to begin tracking the new period.
  4. The balance sheet is generated

The key to understanding the relationship between the balance sheet and income statement is recognizing that income and expense accounts are summarized into equity during step 3, when net income is transferred into the retained earnings account which is, essentially, a lifetime combined income statement. The profit/(loss) increases/(decreases) the amount the company owes to its shareholders.

Now that we've explored how the Income Statement is generated, and how the basic account structure for profit and loss tracking is set up, lets see how a sale can be properly accounted for.

Detailed Journal Entry example

We're now ready to continue the lemonade stand example, and account for the sale of a single lemonade for $1.25 that includes $0.50 of raw materials. To make the journal entry we need to know which accounts are available in our chart of accounts:

  • Assets
  • Cash
  • Inventory
  • Lemons
  • Sugar
  • Cups
  • Incomes
  • Sales
  • Expenses
  • Cost of Good Sold
  • Lemons
  • Sugar
  • Cups

As described previously, we will use a journal entry to record this sale. First we might just record the fact that someone gave us money. It might look something like this:


PROTOTYPE JOURNAL ENTRY EXAMPLE

Date: July 31, 2014

Description: Sold 1 lemonade

Account

Debit

Credit

Cash (asset account)

1.25

Sales (income account)

1.25

Total Debit/Credit:

1.25

1.25

The bottom row are sums of the entries above. We add this row in a spreadsheet, where we inevitably develop journal entries, to make sure that balance is maintained at all times. It's important to note that they DO NOT belong in the actual journal entry!

We have not accounted for inventory used nor expenses, which are quite important things to account for! A nearly complete journal might look like this:

NEARLY COMPLETE JOURNAL ENTRY EXAMPLE

Date: July 31, 2014

Description: Sold 1 lemonade

Account

Debit

Credit

Cash (asset account)

1.25

Sales (income account)

1.25

COGS:Lemons (expense account)

0.25

Inventory:Lemons (asset account)

0.25

COGS:Sugar (expense account)

0.15

Inventory:Sugar (asset account)

0.15

COGS:Cups (expense account)

0.10

Inventory:Cups (asset account)

0.10

Total Debit/Credit:

1.75

1.75

We learned to build journal entries in this manner, with each debit offset by credit(s) that "match" the debit. It helps keep things organized and simple when developing journal entries.

But that is not the industry standard format, so let's recast that into final form:

FINAL FORM JOURNAL ENTRY EXAMPLE

Date: July 31, 2014

Description: Sold 1 lemonade

Account

Debit

Credit

Cash (asset account)

1.25

COGS Lemons

0.25

COGS Sugar

0.15

COGS Cups

0.10

Sales (income account)

1.25

Inventory Lemons

0.25

Inventory Sugar

0.15

Inventory Cups

0.10

You now have a firm grasp on the fundamentals of accounting. With just these simple ideas you can pretty much account for ANY type of business.

In Accounting for Developers 103 we describe how Subledger respects these traditions, while modernizing accounting to meet the needs of real-time information systems.

SUBLEDGER-Logo-Large-RGB-Black.jpg