In this post-divorce proceeding, L.T. Watson (petitioner) appeals the district court’s interpretation of the separation agreement entered into by petitioner and her husband, T.S. Watson (respondent), during the pendency of their divorce. The court found the parties’ agreement as incorporated in the final decree was unambiguous and contemplated that the responsibility for any capital gains tax liability generated by the sale of certain stock in Coca-Cola Enterprises, Inc., would be shared equally by the parties.
*13The court’s ruling was based upon the doctrine of species of common ownership in marital property as explained in Cady v. Cady, 224 Kan. 339, 581 P.2d 358 (1978), and subsequent cases of the Kansas Supreme Court. We affirm the trial court’s decision, although our analysis differs.
The Underlying Circumstances
The respondent is a well-known and highly successful professional golfer. Assured Management Company (AMC) has managed the financial affairs of the Watsons for many years. The petitioner’s brother, Charles E. Rubin, is a principal of AMC. Among the parties’ assets was respondent’s 84 percent beneficiary interest in an inter vivos trust holding 374,846 shares of common stock of Coca-Cola Enterprises, Inc. Rubin was the sole trustee and another beneficiary. On July 8,1998, Rubin sold the stock for $14,251,176. The share of the proceeds attributable to the beneficial interest held by respondent was $11,942,475. The capital gains tax approximates $3,000,000.
Petitioner filed this divorce action on December 15, 1997. Throughout the divorce, the parties were each represented by skilled and respected attorneys. AMC prepared a marital balance sheet disclosing the parties’ assets, liabilities, and net worth as of June 30, 1998. That balance sheet was made an exhibit to the parties’ separation agreement, which was signed on September 16, 1998,—not so coincidentally, the same date their divorce was granted and the agreement approved and incorporated into the decree by the district court.
The relevant sections of the separation agreement state:
“III. DIVISION OF NET WORTH
“4. Assets to be Divided Equally in Kind. That the following assets shall be divided equally in kind between the parties:
“Commerce Bank Checking (and all other bank or other financial institution accounts . . . ).
“ ‘Investments1 (as denominated in the accounting by Assured Management Company [and] as shown on tire attached Exhibit 1) . . . .
*14TV. MISCELLANEOUS
“1. 1998 Federal and State Income Tax Returns. The parties shall file separate federal and state income tax returns for 1998 ....
“4. Role of Assured Management Company. That unless otherwise agreed upon by the parties, the determination of federal and state income taxes attributable to unrecognized capital gains (net of unrecognized capital losses), and the mechanics of effectuating divisions of the parties’ assets agreed to herein, shall be determined and handled by Assured Management Company.”
Exhibit 1 referred to in § III, ¶ 4 of the parties’ separation agreement is the parties’ balance sheet of June 30, 1998, prepared by AMC. The Coca-Cola stock is listed on that balance sheet as an investment with a fair market value of $1,557,141.28. It is fair to say the parties negotiated their settlement based upon the financial information given in exhibit 1.
At the divorce hearing before the trial judge, the petitioner presented uncontested evidence to satisfy the district court that a divorce should be granted and the parties’ separation agreement approved. The judge granted the divorce and then stated:
“I’ve reviewed [the separation agreement], and on its face it appears to comprehensively dispose of the assets and liabilities of the parties in a fair and equitable manner. It appears to have been done so after full disclosure of those assets and liabilities. And based upon that, I’ll approve that and incorporate that into the Court’s decree of divorce.”
When the court was finished with its rulings, counsel was asked if there was anything further. The following discussion then occurred:
“MR. JOHNTZ [counsel for petitioner]: Judge, now that you’re mentioning that, the—actually, believe it or not, the net worth of the parties increased the month after in July with a capital gain, increasing it from what may show there, around 20 some, to close to, I think after tax, maybe 35. Since you made reference to that—it’s basically from a [In re Marriage of Kirk, 24 Kan. App. 2d 31, 941 P.2d 385, rev. denied 262 Kan. 961 (1997),] independent decision, let me disclose that. But let me say also, essentially, since the matter provides for a 50/50 division of everything, it’s really not technically relevant, but it is entirely different than that before you.
“MR. WAXSE [counsel for respondent]: That’s a correct statement.
“THE COURT: It’s a rising tide.
*15“MR. JOHNTZ: And interestingly, Judge, it was not one of the rising tides that then came back down because the—as luck would have it, again, the asset got sold and so the capital gain was locked in.
“THE COURT: I suspect a little more than luck involved in that. In any event, I think it’s a fair and equitable distribution. I’ll approve it.” (Emphasis added.)
Subsequently, pursuant to § III, ¶ 4 of the parties’ agreement, AMC divided the Coca-Cola proceeds equally between the parties, with no funds retained to pay capital gains taxes.
Because the stock had been held by an inter vivos trust with respondent as beneficiary, his Form 1099 reflected all of the parties’ taxable gain from sale of the stock. Petitioner has denied that she is in any way responsible for paying her proportionate share of the capital gains tax. Respondent contends the agreement, together with the statements of counsel at the divorce hearing, demonstrate the parties’ mutual intent to divide the proceeds from sale of the stock equally after taxes. Petitioner argues that the separation agreement provides unambiguously that she was entitled to one-half of the monies in the parties’ account and that each of the parties is to pay his or her own income taxes for 1998. She defines the entire amount due for the capital gain on the Coca-Cola stock as respondent’s liability.
After considering the arguments of counsel, the trial court stated in its ruling:
“Petitioner correctly observes that the language in the separation agreement is clear and unambiguous in that the ‘investments’ are to be equally divided between the parties and each is to file his or her separate income tax returns for 1998, the year in which the gain was realized. However, that observation begs the question of who, in fact, realized the gain upon which taxes were to be paid. Thus, the issue is not the interpretation of the contract, but rather an independent legal determination as to the ownership of the trust assets at the time they were sold and the gain realized.
“Under Kansas law the filing of the petition in this case created a species of common or co-ownership in the trust property. The extent of that ownership had to await the determination by the court in its approval of the separation agreement. Here, the trust assets were sold before the entry of the divorce decree. However, at the time of the filing of the divorce action, and at the time of the sale, the parties were co-owners of the trust assets; and they ultimately agreed, and the *16court ordered, that each should receive one-half of the trust assets or, in this case, the proceeds from the sale of those assets.
“Cady and [In re Marriage of Smith, 241 Kan. 249, 737 P.2d 469 (1987),] control this case. The trust assets, although titled to the respondent, were held in a species of common or co-ownership with petitioner. Therefore, petitioner was co-owner of the trust assets at the time of their sale. Since the sale of the trust assets was a taxable event, as a co-owner petitioner recognized a gain on the transaction to the extent of her proportional interest in the sale proceeds. Therefore, in accordance with ¶ IV. 1, petitioner is liable for the tax on her one-half of the gain.”
L.T.’s motion to alter or amend was denied and a timely appeal has been filed contesting the trial court’s subject matter jurisdiction and application of the species of common ownership concept requiring petitioner to pay one-half of the capital gains tax that is owed.
. Subject Matter Jurisdiction
L.T. contends the trial court was without subject matter jurisdiction to decide “petitioner is hable for the tax on her one-half of the gain.” L.T. argues that who should pay the capital gains tax is a federal question not to be resolved in a state proceeding. Our standard of review on jurisdictional questions is unlimited. See In re Marriage of Killman, 23 Kan. App. 2d 975, 976, 939 P.2d 970 (1997), rev’d on other grounds 264 Kan. 33, 955 P.2d 1228 (1998).
T.S. counters that the trial court did not determine the federal question of personal income tax liability for either party. Upon L.T.’s motion to alter or amend, the trial court clarified its ruling, stating:
“I’m not suggesting and not ordering that one party pay to the other party anything or pay to the federal government anything. The parties are going to file their own tax returns based on however they think they—they can support it and this I’m sure will be some evidence as to—as to which is the correct interpretation.”
In Cady, 224 Kan. at 341, the court stated:
“Under federal tax statutes a taxable transfer presents a question controlled by federal law. State law may control only in [the] event the federal tax law, by express language or necessary implication, makes operation of the tax law dependent upon state law. (Lyeth v. Hoey, 305 U.S. 188, 83 L. Ed. 119, 59 S. Ct. 155 [1938].) Where state law controls, federal courts must ascertain and apply state law. (Hud*17dleston v. Dwyer, 322 U.S. 232, 88 L. Ed. 1246, 64 S. Ct. 1015 [1944].) The field of domestic relations belongs exclusively to the state. (McCarty v. Hollis, 120 F.2d 540 [10th Cir. 1941].)”
We are persuaded the trial court acted within its jurisdiction. The trial court decided L.T.’s legal interest in the Coca-Cola stock at the time of sale; that was an issue appropriately decided under state law. Certainly our conclusion is bolstered by the trial court’s explanation of its order. We conclude L.T.’s jurisdictional claim to be without legal merit.
Species of Common Ownership
(a) K.S.A. 23-201(b)
Both parties have vigorously argued whether K.S.A. 23-201(b) is applicable and dispositive. We do not read the district court’s decision to rely upon K.S.A. 23-201(b); instead, the court relied upon common-law development of the doctrine of a species of common ownership in marital property, which arises upon the filing of a divorce action.
K.S.A. 23-201(b) states:
“(b) All property owned by married persons, . . . whether held individually or by the spouses in some form of co-ownership, such as joint tenancy or tenancy in common, shall become marital property at the time of commencement by one spouse against the other of an action in which a final decree is entered for divorce .... Each spouse has a common ownership in marital property which vests at the time of commencement of such action, the extent of the vested interest to be determined and finalized by the court, pursuant to K.S.A. 60-1610 and amendments thereto.”
K.S.A. 23-201(b) did not alter preexisting common law. It merely emphasized that, under Kansas law, each divorcing spouse has an ownership interest in all marital property and any transfer of such property between them to effectuate a fair, just, and equitable properly division is a transfer between co-owners. See Smith, 241 Kan. at 252; 1 Elrod & Buchele, Kansas Family Law § 4.23 (1999). This emphasis was needed because the Internal Revenue Service (IRS) had earlier sought to treat such transfers as gain-generating and thus taxable. See United States v. Davis, 370 U.S. 65, 67-69, 8 L. Ed. 2d 335, 82 S. Ct. 1190, reh. denied 371 U.S. 854 (1962). *18K.S.A. 23-201(b) adds nothing to either side’s argument that cannot be gleaned from an examination of Kansas common law on the doctrine of a species of common ownership.
(b) The Common-law Concept
The decision of the Kansas Supreme Court in Cady was also in response to Davis, 370 U.S. at 68-69. In Cady, a provision of the property settlement agreement required the husband to transfer corporate stock held in his name to the wife. After the divorce, the IRS assessed a substantial income tax deficiency against the husband, arguing the divorce had effected a taxable transfer of property. The Cady court stated:
“Prior to the filing of a petition for divorce a spouse may dispose of his or her personal property without regard to the other spouse. [Citations omitted.] At that time a spouse possesses only an inchoate interest in real estate held by the other spouse. [Citation omitted.] The filing for divorce, however, has a substantial effect upon the property rights of the spouses. At that moment each spouse becomes the owner of a vested, but undetermined, interest in all the property individually or jointly held. The court is obligated to divide the property in a just and equitable manner, regardless of the title or origin of the property. [Citations omitted.]
“We hold that the filing of a petition for divorce or separate maintenance creates a species of common or co-ownership in one spouse in the jointly acquired property held by the other, the extent of which is determined by the trial court pursuant to K.S.A. 1972 Supp. 60-1610(b). Except for those rights which vest by virtue of the filing of the divorce action, we in no way change the interest of one spouse in the property held by the other, or in the ability of the other spouse to convey, sell or give away such property.” 224 Kan. at 344.
The common-law doctrine expressed in Cady was taken one step further in Smith. In that case, the court held that marital properly was not subject to a hen or execution based upon a judgment obtained against one spouse or co-owner during the pendency of the divorce action because of the vested interest of the other spouse or co-owner. 241 Kan. 249, Syl. Smith made clear that the doctrine did more than remove property division transfers from the reach of the tax man. It also gave the previously uninvolved spouse property rights that trumped those of creditors seeking to collect from the involved spouse until the ownership of the property is finalized by the decree.
*19Thus, the Kansas courts have invoked the doctrine of species of common ownership in two situations: (1) to prevent a transfer of title between divorcing spouses from being seen as a taxable transaction, and (2) to protect the vested interest of one divorcing spouse when a creditor of the other divorcing spouse attempts to take control of property or its value during the pendency of the .divorce. Our courts have not previously applied the doctrine as the trial court did here: to permit a spouse to use the doctrine offensively to divide capital gains tax liability when property has been sold during the pendency of a divorce. The federal district court and, later,-the Tenth Circuit have invoked the doctrine to shift tax liability on income generated by a portion of a partnership interest post-divorce at the insistence of one of the ex-spouses, but that situation is distinct. See Kenfield v. United States, 783 F.2d 966, 968-70 (10th Cir. 1986) (following and expanding upon Imel v. United States, 523 F.2d 853, 855-57 [10th Cir. 1975]).
This review of the common law leads us to disagree with the district court’s analysis. Cady and its progeny are instructive but not controlling of the outcome here.
Interpretation of Separation Agreement and Hearing Remarks
In this case, the Coca-Cola stock was no longer part of the marital estate when the trial court entered its final orders under K.S.A. 2000 Supp. 60-1610(b). Rather, the trustee, in his sole discretion, had liquidated the stock and deposited the before-tax proceeds into one of the parties’ accounts that was to be split 50/50. The separation agreement itself did not address this specific situation, but it was brought to the court’s attention by the parties’ counsel at the divorce hearing and explained. At that point, the court was assured by petitioner’s counsel that essentially, since the agreement provided for a 50/50 division of everything, it was really not technically relevant that the stock had been sold and “locked in” a capital gain that increased the parties’ joint net worth by several million dollars.
Based on that representation, and the agreement of respondent’s counsel, the court ruled that the distribution of assets reflected in *20the separation agreement and its attachment was fair and equitable.
We see no reasonable alternative to our interpretation of the exchange at the divorce hearing: that is, the stock sale was intended to change nothing about the parties’ relative financial positions. That, in addition to the enormous positive injection for their net worth, is why neither side took issue with it. If the sale had not occurred during the pendency of the divorce, each spouse would have left their union with 50 percent of the 84 percent beneficiary interest in the trust, or perhaps 50 percent of the stock it represented. If and when either or both sold the stock post-divorce, each party would have borne his or her 50 percent share of the tax burden. In order for the sale truly to have made no relevant difference, as represented by counsel at the hearing, or, to put it another way, to maintain the fair and equitable division, each party must now be seen as having realized half of the gain the sale produced during the pendency of the divorce. Otherwise their relative financial positions would have been changed by the sale—petitioner’s $1.5 million to the better and respondent’s $1.5 million to the worse. This was not the intention of a document that states the stock is to be shared equally nor of the remarks made to the court during the hearing.
We affirm the district court on this alternate analysis of the undisputed facts before it. If a trial court reaches the right result, its decision will be upheld on appeal even though the trial court relied upon the wrong ground or assigned erroneous reasons for its decision. Bergstrom v. Noah, 266 Kan. 847, 875-76, 974 P.2d 531 (1999). We are satisfied that the separation agreement unambiguously indicated the parties’ intent to transfer the stock in kind and that the remarks made by counsel confirm that intention once the stock had been liquidated. The parties did not mean to alter the balance of their property division by allocating the entire tax burden accompanying the gain to one side.
Affirmed.