Converter tool

Profit and Loss Statement from a Transactions CSV

Map the categories in a ledger or bank export to revenue, cost of goods sold, operating expenses and other, then get monthly columns, subtotals, margins and a prior-period comparison as CSV, XLSX with formulas, or PDF. Everything is calculated in this browser tab.

One row per transaction

1. Your transactions

Or paste the table

Profit and Loss Statement from a Transactions CSV

Operator: Abdulla Al Fahad. How tools are built and checked

A year of bank transactions is not a P&L until each line is told which part of the statement it belongs to. Rent is an operating expense, card fees on a sale are a cost of goods sold, a transfer to the owner is neither. This page reads a ledger export, shows every distinct category with a starting guess, lets you correct each one, and then lays out the statement by month with subtotals, margins and an optional comparison with an earlier period.

The statement is cash-style: it reports the transactions in your file on the dates they appear, with no accruals, depreciation schedules or inventory adjustments unless your ledger already contains them.

Key features

  • Every category listed with its row count and net amount, each mapped to Revenue, Cost of goods sold, Operating expenses, Other income, Other expense or Leave out
  • Keyword-based starting guesses for the mapping, including transfers and owner draws as Leave out
  • Monthly columns, a Total column, subtotals, gross, operating and net margins
  • Comparison with the previous period of equal length or the same months a year earlier, with change and change percent
  • XLSX export in which subtotals (SUM), margins (IF) and the comparison are live formulas, plus a mapping sheet
  • A landscape PDF statement and a CSV of the same table, plus a chart of revenue, gross profit and net income by month

How categories map to P&L sections, and how the signs and subtotals work

You need a date, a category or account name and an amount for each transaction; other columns are ignored. Dates may be ISO, slash dates (day-first is detected) or 9 Mar 2025; amounts may carry a currency symbol, thousands commas or accounting parentheses. Rows with an unreadable date or amount or no category are skipped and counted. The period can be up to 60 months, and the file up to 25 MB and 300,000 rows.

Two sign conventions are supported. In signed mode, money in is positive and money out is negative, as in a bank export: revenue categories use the amount as is, cost categories use its negative. In positive mode every amount is positive and the section you choose decides the direction. In both modes a refund booked as a negative sale reduces revenue, and a refund of an expense reduces that expense.

How it works

Each transaction is assigned to the month of its date and to the section its category is mapped to; amounts are summed per category and month. Total revenue and total cost of goods sold are sums of their lines. Gross profit is revenue minus cost of goods sold; operating income is gross profit minus operating expenses; net income is operating income plus other income minus other expense. A margin is that line divided by total revenue, shown blank when revenue is zero. Margins in the Total column use the totals, not an average of monthly margins.

For a comparison, the tool builds the same statement for the comparison months using the same category list, so a category with no activity in one of the periods still appears with zero. It warns when the file covers only part of the comparison period, since the change would then be overstated.

In the PDF, a period of up to 11 months (8 with a comparison) is shown month by month; longer periods are grouped into three-month columns up to 33 months (24 with a comparison) and into years beyond that, so the table fits the page. The CSV and XLSX always keep every month.

Common use cases

  • Turning a year of 3,000 bank transactions into a monthly P&L for a lender, with transfers and owner draws left out
  • Comparing the last quarter's margins with the same quarter a year earlier for a seasonal shop
  • Testing whether moving payment processing from operating expenses to cost of goods sold changes a 79.5% gross margin to 76.9%

How to use this tool

  1. Upload the transactions or load the example, then confirm the date, category and amount columns and the sign convention.
  2. Go down the category list and correct any section that is wrong; set transfers, owner draws and loan principal to Leave out.
  3. Choose the period and an optional comparison, read the statement, and download the XLSX, CSV or PDF.

Example

Three months of a small studio's ledger, signed amounts (load example)

date,category,description,amount
2025-01-05,Sales,Website orders,12400
2025-01-12,Consulting income,Brand audit,3000
2025-01-14,Materials,Paper stock,-3100
2025-01-15,Payment processing,Card fees,-390
2025-01-20,Salaries,January payroll,-6800
2025-01-31,Owner draw,Transfer to owner,-1000
...

Statement, January to March, with the guessed mapping

                          Jan     Feb     Mar   Total
Total revenue          15,400  16,200  19,500  51,100   (Mar includes Refunds -600)
Total cost of goods     3,490   3,930   4,390  11,810
Gross profit           11,910  12,270  15,110  39,290   margin 76.9%
Total operating exp.    9,460   9,960   9,960  29,380
Operating income        2,450   2,310   5,150   9,910   margin 19.4%
Other income (net of fees)  12      12     -35      -11
Net income              2,462   2,322   5,115   9,899   margin 19.4%
Owner draw (-1,000 in Jan) is set to Leave out and is not in the statement.
March against the previous month: revenue 19,500 vs 16,200, net income 5,115 vs 2,322

Tips for best results

  • Move one category and watch gross margin. Payment processing as cost of goods lowers the example's gross margin to 76.9%; as an operating expense it would be 79.5% and operating income would not change.
  • Set transfers between your own accounts to Leave out first. They inflate both revenue and expenses and cancel out only if both sides are in the file.
  • In the XLSX, overwrite an item's monthly number to test a what-if: the subtotals, margins and comparison recalculate because they are formulas. The Category mapping sheet records which section each category was in.

Common pitfalls

The statement is only as good as the categories in your ledger. A bucket such as Miscellaneous or Uncategorised will land in operating expenses by default.

Cash timing is not accrual timing. An annual software bill paid in March shows entirely in March, and unpaid invoices do not appear at all.

Owner draws, loan principal, sales tax collected and credit-card payments are not income or expenses. If you leave them mapped, profit is wrong.

Margins use the revenue you mapped. If revenue is net of refunds in one export and gross in another, margins are not comparable between them.

Common errors and how to fix them

"Every category in this period is set to Leave out, or has no rows"
At least one category in the chosen months must map to a section other than Leave out. Check the period and the mapping.
"The end month is before the start month"
Swap the From and To months. The period runs from the first to the last month inclusive.

Best practices

  • Save the XLSX each month and keep the mapping sheet with it, so next month's statement uses the same classification.
  • Compare the same months a year earlier, not just the previous period, when the business has seasons.

Frequently asked questions

Why is Total revenue lower in March than the Sales line plus Consulting income?

A Refunds category of -600 is mapped to revenue in March, so total revenue is 15,900 + 4,200 - 600 = 19,500. Refunds are treated as negative revenue by the starting guesses.

Can I use positive amounts for both income and expenses?

Yes. Choose All positive in the sign setting; the section then decides whether an amount adds to profit or subtracts from it.

Why is the PDF grouped in quarters but the XLSX is not?

A landscape page fits about a dozen narrow columns. The workbook and CSV have no such limit, so they keep every month.