One of the most important steps in attempting to calculate cash flow is breaking your business down into cycles. Some examples of business cycles are: inventory cycle, accounts payable cycle, sales cycle, and accounts receivable cycle.
The key to smooth cash flow is to coordinate these cycles as much as possible with one another. Unfortunately for many of our clients, thorough coordination is difficult, sometimes impossible. Inventory needs to be procured, products/services are sold, and only then are funds received from accounts receivable. Unfortunately, overhead needs to be paid for and as well as inventory.
The best solution is to try to negotiate with your vendors and find a payment schedule that works with your cash flow schedule. You should also make sure you convert your sales to cash in the shortest possible time. However, because many of your vendors and clients face the same issues you do, it is not infrequent that you will unable to put off paying invoices until people pay you. Many of your vendors may not even be able to deliver a product or service before it is paid for. If this is the case in your business, you may want to look into alternative financing such as a small business loan, or a business cash advance.
Here is a more detailed article/post on Cash Flow.