> ## 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.

# Calculating Retained Earnings

> Complete a quick fix to set up retained earnings for NetSuite, Xero, or QuickBooks Online.

<iframe width="720" height="467" src="https://www.loom.com/embed/82c6f24084364b4dbbddbabd504ca943?sid=531cd2c5-b672-48a5-83c1-95d42db54f57" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen />

When importing your chart of accounts from Oracle NetSuite, Xero, or QuickBooks Online, Francis does not currently include a retained earnings account. Manually calculating retained earnings is therefore necessary on your balance sheet for these entities.

<Info>
  Including retained earnings for Netsuite, Xero and Quickbooks Online is scheduled for release during 2025. If you have questions about this upcoming feature, feel free to reach out at [support@francis.app](mailto:support@francis.app).
</Info>

To calculate retained earnings, add net profit (or loss) to the beginning retained earnings balance:

```typescript theme={null}
// Example
= "Retained earnings"[-1] + "Net profit"[0]
```

If currency conversion is enabled on your NetSuite, Xero, or Quickbooks connection, the retained earnings formula must account for differences between average and closing exchange rates:

1. **Retained earnings (starting value):** Adjust to the new month’s closing exchange rate.

2. **Net profit (current month):** Convert from the average exchange rate to the closing rate.

```typescript theme={null}
// Currency conversion example
= "Retained earnings"[-1] / "Exchange rate - closing"[-1] * "Exchange rate - closing"[0] 
+ "Net profit"[0] / "Exchange rate - avg"[0] * "Exchange rate - closing"[0]
```
