# QBI calculation when S Corp owns LLC

I am sole owner of an S Corp that is a member in an LLC.

Let's say my S Corp gets \$100k from the LLC, of which \$50k is guaranteed payments (not eligible for QBI) and \$50k is K-1 income (eligible for QBI). My S Corp pays me an \$80k salary, and the remaining \$20k is K-1 income.

My accountant is calculating my QBI as (\$20k from S Corp K-1) - (\$50k guaranteed payments) = (-\$30k QBI loss).

That doesn't make sense to me. The business is profitable and should have some positive QBI. There's some double counting going on here.

Two ways to calculate QBI that would seem to make sense to me:

1. I have \$20k of business income, half of which should be disallowed because half of the revenue was from guaranteed payments, so I should have (\$20k * 50%) = \$10k of QBI.
2. My S Corp doesn't actually "see" that the source of its revenue is from guaranteed payments from an LLC. Instead the QBI is just calculated a la the typical S Corp (the reasonable-salary W-2 wages count against QBI), and thus the full \$20k is QBI.

Are we calculating QBI wrong? Or is this just an issue with the current structure of my business, and I do actually have a QBI loss?