Profit is revenue minus expenses, counted the moment a sale is invoiced. Cash flow only counts money that has actually landed in the account. A business can log a profitable month and still have no cash on hand if that revenue is sitting in unpaid invoices, this gap is where most small business cash crunches actually happen, not from a bad business model.
Want the full method? See cash flow vs. profit: why the difference can sink a profitable business for a full worked example.