Retirement tax questions

I have no earned income (wages), but I do have capital gains/dividends.  I'm looking for how the deduction is calculated in that case.  The "What If" from shows a deduction, but not 100% like wages.