When you sell your primary residence, you are required to capitalize any loss or gain at that point; you do not carry over your loss or gain (as you might in an investment property). As such, the timing of the purchase of the next house is not relevant in this discussion: you gained however much you gained already. This changed from the other (rollover) method in 1997 (see this bankrate article for more details.)
However, as discussed in IRS Tax Topic 701, you can exclude up to $250,000 (single or filing separately) or $500,000 (married filing jointly) of gain if it is your primary residence and meets a few requirements (mostly, that you owned it for at least 2 years in the past 5 years, and similarly used it as your main home for at least 2 years of the past 5 years). So given you reported 25% gain, as long as your house is under a million dollars or so, you're fine (and if it's over a million dollars, you probably should be paying a CPA for this stuff).
For California state tax, it looks like it is the same (see this Turbotax forum answer for a good explanation and links to this California Franchise Tax Board guide which confirms it:
For sale or exchanges after May 6, 1997, federal law allows
an exclusion of gain on the sale of a personal residence in
the amount of $250,000 ($500,000 if married filing jointly).
The taxpayer must have owned and occupied the residence
as a principal residence for at least 2 of the 5 years before the
sale. California conforms to this provision. However, California
taxpayers who served in the Peace Corps during the 5 year
period ending on the date of the sale may reduce the 2 year
period by the period of service, not to exceed 18 months.