> ## Documentation Index
> Fetch the complete documentation index at: https://docs.francis.app/llms.txt
> Use this file to discover all available pages before exploring further.

# P&L fundamentals

> How to work with the P&L in Francis: structuring the template, mapping GL accounts, and setting margins and sign conventions.

The P\&L is often where you start in Francis. It's where you forecast and report income and expenses, and it sets the structure the rest of the model builds on.

## The Francis P\&L template

The template includes the classic P\&L categories you'll find in most charts of accounts: revenue, COGS, OPEX, financial items, depreciation, and taxes. OPEX is split further into sales and marketing, admin, rent, and professional services. That structure makes it easy to map your general ledger accounts onto the template. It also includes margins such as gross margin and profit margin.

Redesign the P\&L with components however suits your business. Some teams split gross profit into Gross profit I, II, and III. Others report contribution margin instead of gross profit. Add, rename, and regroup lines as you see fit.

## Map your GL accounts to the P\&L

Map all your P\&L GL accounts to the P\&L. There are two schools of thought in Francis. Some prefer a clean P\&L, where GL accounts are grouped into reader-friendly lines. Others prefer an accounting-oriented layout, with one line per GL account for a direct link to the chart of accounts.

We recommend fewer, cleaner line items. It keeps the model manageable, and you rarely need full chart-of-accounts granularity in a budget. GL accounts are often created with a different purpose in mind than planning and reporting.

## Sign conventions

When you budget and forecast, follow the sign convention: income positive, expenses negative. This matches how actuals arrive from your accounting system, so every subtotal down the P\&L is a sum rather than a subtraction.

## Margins

For margin rows, wrap the formula in `ignore_div_zero()` so it returns zero in periods where revenue is zero, rather than a `#DIV/0` error.

## Aggregation

Aggregate P\&L lines by SUM, since the P\&L reflects performance over a period. Aggregate margins by weighted average, so the total column on the right shows a correct blended margin instead of a sum of percentages.
