Sales price minus basis equals gain. It's that simple --------------------- but I suppose you could make it harder if you really wanted to 😉