This is a simple WebDollar Proof of Stake calculator, is does not calculate the compound interest not it takes into consideration the deflation created by the global Proof of Work reword or the halving every 4 years.
You must install WebDollar Explorer from here to get the global PoS amount: https://github.com/thelazyprogrammer/webdollar-explorer-api
#Example of working calculator: https://webdollar.blog/george_alexandru/2019/webdollar-pos-calculator/