Part of the fundamental financial analysis of any company, investment security, or business project entails the computation of cash flows. This is typically done in a cash flow template Excel spreadsheet which is pre_built for the purpose. The reason for this is that this type of template is not a simple calculator you build on the fly with little effort. It requires a lot of thinking, organizing the spreadsheets and formulas, and some planning about how to model cash in and cash out for each potential investment. In other words, there is no cookie cutter approach because each potential investment has different profit and loss drivers.
Also, how long is your investment horizon? Is it really that important to you to project out to 30 years or is 3λ years sufficient along with a terminal value that represents the expected NPV beyond 5 years? Usually this latter approach works best and looks the most credible to potential investors. There are numerous ways to calculate terminal value including multiples, current market values projected forward, and round guesstimates. Obviously these decisions are affected by your personal preference and the type of investment for which you're calculating present value.