The income i s generally taxed based either on the source of income or on the residency of the recipient of the income.
If you sell your house in California - and it was used as your primary residence at least two-out-of-last-fife-years before the sale - the gain - up to $250,000 will not be taxable.
If you do not qualify for exclusion or your gain will be above the limit - it will be taxable for California because it is considered from California source.
If you plan to change your residency - for tax purposes the IRS dictates that your primary residency is where is your main home. If you have two homes and live in both of them, your main home is ordinarily the one you live in most of the time.
In addition to the amount of time you live in each home, other factors are relevant in determining which home is your main home. Those factors include the following. Your place of employment.The location of your family members' main home.Your mailing address for bills and correspondence.The address listed on your: --Federal and state tax returns,--Driver's license,--Car registration, and--Voter registration card.The location of the banks you use.The location of recreational clubs and religious organizations you are a member of.
Please see IRS publication 523 for details - http://www.irs.gov/pub/irs-pdf/p523.pdf
Each state may have its own determination of residency for tax purposes. Thus for California - your residence is usually the place where you have the closest ties in compare with your ties elsewhere. In using these factors, it is the strength of your ties, not just the number of ties, that determines your residency. A partial list of the factors to consider:
You may review FTB Publication 1031 - http://www.ftb.ca.gov/forms/2008/08_1031.pdf
Let me know if you need any help.