What portion of capital gain should I report for a home sale in a non-resident state?

I sold a home in a state I don't reside in.  I am filing a non-resident state return.  The net capital gain on my federal return is $40,000 (non-resident home sale with a $50,000 gain and other capital gain losses of $10,000).  The non-resident state return it is asking me what portion of the $40,000 capital gain was from the non-resident state.  Not sure if I should report $40,000 or $50,000?