How to calculate Free Cash Flow
Free cash flow is the cash a business generates from operations after paying for the capital spending it needs to keep running.
Formula
Free cash flow = operating cash flow − capital expenditureSQL query
This example assumes: cash_flow_statements(period date, operating_cash_flow numeric, capex numeric). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.
SELECT period,
operating_cash_flow,
capex,
operating_cash_flow - capex AS free_cash_flow,
SUM(operating_cash_flow - capex) OVER (
ORDER BY period ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) AS trailing_4_period_fcf
FROM cash_flow_statements
ORDER BY period;Common mistakes that make Free Cash Flow wrong
- Capex is often stored as a negative number in cash flow statements; check the sign before subtracting.
- Working-capital swings make a single quarter noisy; look at a trailing four periods.
- Capitalised software development counts as capex in some ledgers and as an expense in others.
Ask for Free Cash Flow in plain English
Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.
- What was free cash flow for each of the last 8 quarters?
- What is our trailing four-quarter free cash flow?