
77 B.R. 785 (1987)
In re Leon E. KRUGER, etc., Debtor.
Leon E. KRUGER, Plaintiff,
v.
BENEFICIAL COMMERCIAL CORPORATION, etc., Steven Schwaber, as Chapter 7 Trustee, etc., Defendants.
Bankruptcy No. LA 86-10579-GM, Ref. No. M7-03111-GM.
United States Bankruptcy Court, C.D. California.
September 14, 1987.
As Amended September 28, 1987.
Brad Krasnoff, Danning, Gill, Gould, Diamond & Spector, Los Angeles, Cal., for plaintiff.
Thomas Shuck, Ross & Ivanjack, Los Angeles, Cal., for defendants.

MEMORANDUM OF OPINION RE MOTION TO RECONSIDER AND MOTION FOR SUMMARY JUDGMENT
GERALDINE MUND, Bankruptcy Judge.
On June 15, 1987, a status conference was held on the above-entitled Complaint at which time both sides advised the Court that no facts were in dispute and that this matter could be determined on stipulated facts. The parties agreed that the Court should hear oral argument at that time and rule on the matter. Oral argument was presented and the Court ruled in favor of the defendant, granting a judgment and determining that the judicial lien may not be avoided.
An order was entered to that effect on July 1, 1987. On July 6, 1987, the debtor moved the Court to reconsider its judgment and requested the Court to grant summary judgment in favor of plaintiff. Both sides extensively briefed the case and oral argument was heard on July 23, 1987. The Court submitted the matter for further consideration.
*786 It is stipulated by the parties that the property in question is the debtor's home. The debtor recorded a declaration of homestead on the property on April 19, 1982. There are two consensual liens on the property: a deed of trust to Columbia Savings and Loan Association which was recorded on September 22, 1983 and has a current balance of approximately $205,000, and a deed of trust to Western Federal Savings which was recorded on November 3, 1983 and has a balance of approximately $7,000. Beneficial Commercial Corporation ("Beneficial") obtained a writ of attachment from the San Mateo Superior Court and recorded the same in Los Angeles County on January 6, 1986. The attachment lien thus created is in the amount of $69,546.
The parties further agreed that the present fair market value of the subject property is $260,000. It is further stipulated that the debtor is entitled to a homestead exemption of $45,000.
The Court was presented with no less than 15 cases dealing with this issue or some form of it. In most of the cases the judgment lien is most junior in priority and if the voluntary liens and the debtor's exemption were added together, there would be no equity left in the property to which the judgment lien could attach. In such a situation, the Courts seem relatively split on whether the judicial lien is avoided in full[1] or whether it is not avoided at all.[2] There are many fewer cases in which there is equity left after adding together the voluntary liens and exemption, as is the situation in this case.
Although the Court can find no opinions that are exactly on point, this Court has been given guidance by the Ninth Circuit BAP opinion of In re Baxter, 19 B.R. 674 (Bkrtcy.App. 9th, 1982). In the Baxter case the debtor had given a consensual lien of $38,000, then a series of judicial liens totalling $8,820.47 were recorded. The fair market value of the property was $58,000 at time of filing. After the judicial liens were recorded, the debtor recorded a declaration of homestead which entitled him to an exemption of up to $40,000. The Baxter Court struggled with the issue of whether a declaration of homestead, which was recorded after the judicial liens attached, affects the judicial liens pursuant to California Civil Code § 1237.[3]
In Baxter the Bankruptcy Appellate Panel held that 11 U.S.C. § 522(f) ". . . enables the Baxters to avoid the appellees' liens even though the liens would have remained unimpaired under the California Homestead Law." Id. at 675. Therefore, the liens were avoided in full. The inference to be drawn from Baxter is that the amount of the exemption is to be determined under state law (if state exemptions are chosen), but whether the lien impairs that exemption is based solely on federal bankruptcy law.
In re Stacher, 50 B.R. 18 (Bkrtcy.E.D. Cal.1985) restates this analysis in slightly different circumstances. Stacher dealt with the claimed homestead exemption found in California Code of Civil Procedure § 704.710[4] and allowed the debtors to *787 avoid the judicial lien on their property, even though they had not properly perfected their homestead declaration and therefore the judgment had created a lien on the property. Presumably in Stacher there was no equity remaining after the voluntary liens and the exempt amount.
While this Court is uncomfortable with the concept that a debtor can file bankruptcy, remove liens from the real property, and then continue to hold onto the real property and reap the fruits of its appreciation, this is the intent of the Bankruptcy Code. Not only is this clearly stated in the Baxter case, but 11 U.S.C. § 506 allows a debtor to value a lien during the bankruptcy and then remove the unsecured deficiency from his property even if there is no exemption to be protected.
Section 506(a) determines the extent to which an "allowed" claim is a "secured" claim. "[The creditor] has a secured claim to the extent of the value of his collateral; he has an unsecured claim for the balance of the claim." H.R. No. 95-595, 95th Cong., 1st Session 356 (1977), U.S.Code Cong. & Admin.News 1978, pp. 5787, 6312.
There is some disagreement as to whether a debtor can use § 506(d) to void the unsecured portion of a claim divided under § 506(a) unless the property is being transferred or dealt with in the plan of reorganization. This Court agrees with the reasoning set forth in In re Everett, 48 B.R. 618 (Bkrtcy.E.D.Pa., 1985), which holds that the debtor may at any time during the case have the court divide the claim into secured and unsecured elements and then may avoid the unsecured portion. The division and avoidance is done only on request of the debtor/trustee. If no such request is made, the lien will not be affected by the bankruptcy. In re Endlich, 47 B.R. 802 (Bkrtcy.E.D.N.Y., 1985).
Section 506(d) requires that all liens in excess of the value of the property must be removed if the debtor requests it, whether the liens are voluntary or involuntary. When the involuntary lien is the junior lien, the only issue is whether Congress intended to protect the exemption against the rights of the judicial creditor. Clearly it did.
Based upon the holdings of Baxter and of Stacher, when the involuntary lien is the most junior lien, the formula for lien avoidance would be to subtract the claimed exemption from the value of the property, and if any equity still remains beyond the voluntary lien, the judicial lien would attach up to that amount.
Based on the facts before this Court, it could decide this case without looking any further. Deducting the claimed exemption ($45,000) from the value of the property ($260,000) leaves a balance of $215,000; $212,000 of that is taken up by voluntary liens, leaving a judicial lien of $3,000. The balance of the lien is voided. But one of the problems of these cases is that courts limit their inquiry to the specific facts before them, but propose a formula that appears to apply in other situations.[5]
To avoid this pitfall, it is necessary to expound a formula which would apply in all cases when the court must void liens either under § 506(d) or under § 522(f). It was the apparent frustration caused by a limited scheme of determination which led to the untenable outcome set forth in In re West where although the exemption was "preserved," it was rendered useless to the debtor.
*788 The problem posed by In re West, 68 B.R. 647 (Bkrtcy.C.D.Ca., 1986) is more complex than in most other reported cases. In that case there was a voluntary lien, then a judicial lien, then other voluntary liens. This raises the policy question of whether a junior voluntary creditor should be given priority over a senior involuntary creditor whose lien is subject to avoidance under § 522.
The Bankruptcy Code does not treat the debtor, his voluntary secured creditors, and his involuntary secured creditors in exactly the same fashion. The debtor is granted a set of rights up to the amount of his exemption and these must be protected. The voluntary secured creditor is limited in his rights to the value of the property. The smallest packet of rights is given to the judicial lienholder, who is limited both by the value of the property and by the exemption claimed by the debtor. Whatever formula is used, the Court must balance the rights of each party in light of the intent of the Code. One approach would be to value the property and divide the claims under § 506(d) and then deduct the exempt amount from the involuntary lien. The result of this would be to allow the debtor a higher amount of the value as exempt.[6] This higher exempt amount is at the expense of the junior voluntary secured creditors. Therefore, this Court prefers a formula which would first deal with the claimed exemption and then divide the claims into secured and unsecured portions.
While this gives a windfall to the junior voluntary lienholder (who presumably allowed his lien to attach to overencumbered property), it does not give the debtor a benefit to the detriment of creditors to whom he voluntarily gave liens.
It is an interesting paradox that if all liens were voluntary ones, the debtor would not be entitled to gain any priority over the junior secured creditors. The existence of a judicial lien should not grant the debtor greater rights against the junior voluntary secured creditor than if all senior liens were voluntary. The only way to act in equity is to grant the debtor his exemption only up to the amount of the judicial lien (plus any equity that exists in the property) and not negatively impact on the junior voluntary secured creditor. Further, in terms of priority, the exemption should not be senior to voluntary liens.
In balancing these rights, the court finds the following methodology to be appropriate for all requests for determination and voiding of liens under §§ 506(d) and/or 522(f):
1. Subtract all liens from the value of the property.
2. If the total amount of the liens is equal to or less than the value of the property and there is a judicial lien, deduct from the amount of the judicial lien the claimed exemption less the amount of equity (if any) remaining in the property after step 1. The balance left is the amount of the judicial lien which remains on the property.[7]
3. If the total of the liens is greater than the value of the property and if the liens which are equal to the value of the property are all voluntary liens, void all *789 liens in excess of the value of the property.[8]
4. If the total of the liens is greater than the value of the property and the judicial lien was not voided in full in step 3, determine whether the judicial lien would be partially voided under § 506(d):
a. If the judicial lien is not fully secured under § 506(a), void the unsecured portion and subtract the amount of the exemption from the secured portion. This is the remaining amount of the judicial lien. Then recalculate the total liens against the property (using the reduced judicial lien) and void any lien in excess of the value of the property.[9]
b. If the judicial lien is fully secured under § 506(a), subtract the amount of the exemption from the amount of the judicial lien. The balance is the remaining amount of the judicial lien. Then recalculate the total liens against the property (using the reduced judicial lien) and void any liens in excess of the value of the property.[10]
Using the above formula for the calculations in this case, the Court deducts the total liens ($281,546) from the value ($260,000). The excess $21,546 is avoided under § 506(d). The claimed exemption ($45,000) is subtracted from the remaining judicial lien ($48,000). Therefore the judicial lien which survives bankruptcy will be $3,000. The balance of the claim is an unsecured claim.
The motion to reconsider is hereby granted and judgment shall be entered in favor of the plaintiff, reducing the amount of the lien to $3,000 and avoiding all sums in excess thereof and granting a unsecured claim for the amounts avoided.
NOTES
[1]  In the following cases the judicial lien was avoided in full: In re Blevins, 53 B.R. 74 (Bkrtcy.W.D.Va., 1985); In re Braddon, 57 B.R. 677 (Bkrtcy.W.D.N.Y., 1986); In re Chesanow, 25 B.R. 228 (Bkrtcy.D.Conn., 1982); In re McMaster, 55 B.R. 379 (Bkrtcy.W.D.Pa., 1985); In re Morelock, 47 B.R. 533 (Bkrtcy.N.D.Ohio, 1985).
[2]  In the following cases the judicial lien was not avoided at all: Alu v. State of New York, Dep't of Taxation and Finance, 41 B.R. 955 (Bkrtcy.E.D. N.Y., 1984) and In re Boteler, 5 B.R. 408 (Bkrtcy. S.D.Ala.1980).
[3]  California Civil Code § 1237, et seq. is now superceded by Code of Civil Procedure §§ 704.710-704.850 (claimed homestead exemption) and 704.910-704.990 (declared homesteads). As previously, if a debtor records a declaration of homestead, no judgment lien recorded after that date attaches to the homesteaded property. Judgment liens recorded prior to the declaration of homestead remain as liens, but only attach "to the surplus over all other liens and encumbrances at the time the judgment lien was created and over the amount of the homestead exemptions under C.C.P. § 704.730, C.C.P. § 704.950(c)." CEB, Debt Collection Practice in California § 9.50 (1987).
[4]  Code of Civil Procedure § 704.710 is the statutory "claimed homestead exemption" and does not require the debtor to record a declaration of homestead. Although the judgment liens attach to the property, the law protects the exempt amount by requiring a court ordered sale only after it is determined that there is sufficient equity to pay the exemption in full.
[5]  For example In re Braddon, 57 B.R. 677 (Bkrtcy.W.D.N.Y., 1986), requires that after the liens are ranked in terms of priority, the amount of the exemption is subtracted from the value of the property and the liens, as ranked, are then subtracted from the remaining value of the property. Anything in excess of the remaining value of the property is avoided. Although Braddon describes this as the formula to be used in all § 522(f) motions, this approach is only feasible if the judicial lien is the most junior and if the senior voluntary liens do not exceed the value of the property less the exemption. In any other case the Court would be removing voluntary liens from the property and granting the debtor his full exemption against these voluntary liens.
[6]  Using this formula for the examples set forth in footnotes 9 and 10 yields the following results:

Fn. 9Example 1: remaining1st lien (voluntary) $70,000; equity for debtor = $30,000; all other liens voided.
Fn. 9Example 2: remaining1st lien (voluntary) $40,000; 2d lien (judicial) = $15,000; equity for debtor = $45,000; all other liens voided.
Fn. 10Example 1: remaining1st lien (voluntary) = $10,000; 2d lien (judicial) = $5,000; 3d lien (voluntary) = $40,000; equity for debtor = $45,000.
Fn. 10Example 2: same result as example 1.
[7]  Example: 1st lien (voluntary) = $10,000; 2d lien (judicial) = $50,000; 3d lien (voluntary) = $20,000; FMV = $100,000; claimed exemption = $45,000.

Deduct from the judicial lien ($50,000) the claimed exemption ($45,000) less the remaining equity ($20,000):
$50,000 - ($45,000 - $20,000) = $25,000
The remaining judicial lien is $25,000. All other liens are left intact. Exempt equity = $45,000
[8]  Example: 1st lien (voluntary) = $110,000; 2d lien (judicial) = $50,000; FMV = $100,000; claimed exemption = $45,000.

The judicial lien would be avoided completely; there is no equity for the homestead exemption. The 1st is reduced to $100,000.
[9]  Example 1: 1st lien (voluntary) = $70,000; 2d lien (judicial) = $50,000; 3d lien (voluntary) = $10,000; 4th lien (voluntary) = $10,000; FMV = $100,000; claimed exemption = $45,000.

First void the unsecured portion of the judicial lien ($20,000). Subtract the claimed exemption ($45,000) from the remaining secured portion of the judicial lien ($30,000). The judicial lien is avoided in full, for the exemption exceeds the lien balance. In recalculating the total liens ($90,000), there would remain a 1st (voluntary) = $70,000; 2d (voluntary) = $10,000; 3d (voluntary) = $10,000. The equity available for the exemption is $10,000.
Example 2: 1st lien (voluntary) = $40,000; 2d lien (judicial) = $70,000; 3d lien (voluntary) = $150,000; FMV = $100,000; claimed exemption = $45,000.
First void the unsecured portion of the judicial lien ($10,000). Subtract the claimed exemption ($45,000) from the remaining secured portion of the judicial lien ($60,000). The remaining $15,000 constitutes the new judicial lien. Then recalculate the total liens ($205,000) and avoid any that are in excess of the value of the property ($105,000). There would remain a 1st (voluntary) = $40,000; 2d (judicial) = $15,000; 3d (voluntary) - $45,000. No exempt equity remains for the debtor.
[10]  Example: 1st lien (voluntary) = $10,000; 2d lien (judicial) = $50,000; 3d lien (voluntary) = $150,000; FMV = $100,000; claimed exemption = $45,000.

Subtract the amount of the exemption ($45,000) from the judicial lien ($50,000). The remaining $5,000 is the amount of the judicial lien. Recalculate the total liens ($165,000) and avoid any that are in excess of the value of the property ($65,000). There would remain a 1st (voluntary) = $10,000; 2d (judicial) = $5,000; 3d (voluntary) = $85,000. No exempt equity remains for the debtor.
Example 2 is identical to example 1 except that the 3d lien (voluntary) = $70,000. On recalculation there would remain a 1st (voluntary) = $10,000; 2d (judicial) = $5,000; 3d (voluntary) = $70,000. There is $15,000 of exempt equity for the debtor.
