The following opinion was delivered,
By Mr. Justice Sutherland.The decree of Chancellor Sanford necessarily involves or presupposes the following propositions: 1. That Henry I. Van Rensselaer and John Livingston were co-sureties for William Y. Burroughs, *71in the bond given by them all to Brockholst Livingston, on the 2d day of August, 1798; that is, that the bond was given for (he individual debt of Burroughs, and that Livingston and Van Rensselaer were merely his sureties; 2. That the bond had been paid by Van Rensselaer, and that he was entitled to call upon Livingston, his co-surety, for contribution ; 3. That the bond and mortgage of Marlin Kellogg had come to the hands of Van Rensselaer, and ought to be applied to this debt; that whatever sum, therefore, that bond and mortgage had produced to Van Rensselaer, or with due diligence might have been made to produce, was to be deducted from the amount paid by him to Brockholst Livingston, and John Livingston, the defendant, was to be held responsible for one half the balance. The questions therefore submitted to the master were, 1. The amount which Henry I. Van Rensselaer had paid to Brockholst Livingston, and 2. The sum with which he was justly chargeable on account of the bond and mortgage of Kellogg. His investigations were accordingly principally directed to those two points.
As to the amount paid by Van Rensselaer to Brockholst Livingston,, there is no dispute. It was a mere matter of computation, and is slated by the master to have amounted, with interest up to the 15th day of August, 1809, to $>8027, 75. That date was assumed by the master as the proper lime to strike the balance, because it was the day on which the premises covered by the mortgage of Martin Kellogg were sold, and purchased in, by or on behalf of Van Rensselaer. The master considered Van Rensselaer as having acquired the legal title to the premises by that sale, and as being justly chargeable with the fair cash value on that day. The report of the master was excepted to substantially upon the three following grounds : 1. Because Van Rensselaer was charged with the value of the mortgaged lands, on the 15th July, 1809, the day of the mortgage sale, by virtue of which the legal title, according to the report, became vested in him ; whereas he should have been charged with whatever sums they produced in the subsequent sale or disposition made of them by him or by Jacob or Jeremiah Van Rensselaer, who it is alleged were his agents, and acted for him ; 2. *72Because a commission of 5 per cent, and $50 for the expense of foreclosing the mortgage were allowed to Van Rensselaer ; and 3. Because the master took the testimony of Jacob R. Van Rensselaer, who, it is contended, was an incompetent witness. In support of the first exception, it was contended by the appellant, in the court of chancery, and is insisted here, that the title which Van Rensselaer acquired in the mortgaged premises, under the mortgage sale, he held in trust for himself and his co-trustee, and that he was bound to re-sell and apply the proceeds to the joint benefit of both. On the other hand, it is contended that Van Rensselaer acquired, under the statute foreclosure, an absolute estate in his own right, unaffected with any trust in favor of Livingston, and that whatever disposition he subsequently made of the lands, he can be charged only with their value at the time of his purchase. But even admitting the trust, it is insisted that the exchange made with JacobR. Van Rensselaer was a valid and bona fide alienation of the property, and that the respondents can in no event be chargeable with any thing more than the clear net value of whatever was received upon that exchange; and it is insisted that the evidence shews that such value was about the same with the cash value of the mortgaged premises at the time of the sale.
It cannot be pretended that there was any express trust between Henry Van Rensselaer and John Livingston ; that is, that there was any understanding that Van Rensselaer should take an assignment of the mortgage and foreclose it, and purchase in the mortgaged premises, to be subsequently disposed of for their mutual benefit. Livingston utterly refused to advance any money, or to enter into any arrangement upon the subject, and left Van Rensselaer to pay the debt and to reimburse himself as he best could. It was a fair public sale, conducted in the usual manner, and if the premises had been purchased by a stranger, he would undoubtedly have acquired a clear and absolute title in his own right. Van Rensselaer had a right to become a purchaser. He had been compelled to pay the debt for which this mortgage was given as collateral security, and having paid the debt, he was entitled to the security. He bad a personal interest in it, which put *73him in the condition of a mortgagee, and authorized him to become a purchaser for his own account and indemnity. The extent of the obligation which the most liberal principles of equity would impose upon him in relation to his co-surety, was to credit the actual value of the land at the time of the purchase, instead of the auction hid, upon the debt to which his co-surety was bound to contribute. This is the basis on which the master’s report is founded, and "there is no complaint that that value has not been fairly and properly ascertained. I can perceive no principle on which any trust in favor of Livingston can be charged upon the lands themselves after the mortgage sale. His claim was a personal one against Van Rensselaer, and was limited to their value at that time. The title acquired by Van Rensselaer was absolute, and lie was not «object to any contingent accountability to bis co-surety. If the mortgage sale had been for a substantial though inadequate price, instead of a merely nominal one, it would have admitted of very serious doubt whether Livingston would not have been concluded from instituting an inquiry into the actual value of the lands at that time. He certainly would, if he had bad actual instead of constructive notice of the sale. He might have attended the sale, and have taken care of his own interest by bidding more, if he thought the lands were worth more. He could not have folded his arms, and Lave retained the privilege of considering Van Rensselaer cither an absolute purchaser, or as his trustee in the transaction, according as circumstances should determine the one or the other to be most beneficial to himself. Equity will not permit a co-surety voluntarily to assume a position which will secure to him all the advantages, without exposing him to any of the perils which may result from the acts of his associate; but under the circumstances of this case, the sale was properly considered by the chancellor as affording no legal evidence of the value of the mortgaged premises at the time of the sale. The reference to a master to ascertain that value was therefore proper, and the inquiry was correctly restricted to that time; hut if Van Rensselaer was to be held responsible for the amount which he subse*74quently realized from the mortgaged premises, the result would certainly not be more favorable to the appellants; for it appears from the corrected testimony of Jacob Van Rensselaer, that in the exchange made between him and Henry I. Van Rensselaer, the mortgaged lots were estimated at less than $2000, and there is no pretence that that was not an absolute and bona fids alienation of them. There is no ground for the suggestion that either Jacob or Jeremiah Van Rensselaer was the agent of Henry in the subsequent sale or disposition of these lots, or that he ever realized any thing further from them. The objection to the decree, therefore, is unfounded so far as it rests upon the grounds which we have been considering.
The commission of 5 per cent, and $50 for the expense of foreclosing the mortgage were properly allowed by the master. They were objected to principally, as I understand, on the ground that they were not within the order of reference, and not on the ground that the allowance was not equitable and proper in itself. The order directed the master to state such account as he should think proper to shew the true sum with which Henry I. Van Rensselaer ought to be charged by reason of the bond and mortgage. In such an account, the expenses incurred in perfecting his title to the mortgaged premises, and the probable delay or loss in converting them into money, would be necessary ingredients. The allowance was clearly within the scope of the order, and was in itself reasonable and proper.
The objection to the admission of the depositions of Jacob Van Rensselaer is also unfounded. He had no interest in the event of this cause at the time when it was commenced, in 1816, nor until the spring of 1822. His examination in chief was in August, 1817, and his subsequently acquired interest could not affect the competency of those depositions. He was however examined, upon the reference before the master in August, 1826, after his interest accrued; but it was merely for the purpose of correcting his depositions upon a point which obviously had no influence upon the report of the master or the subsequent decree. The competency of the witness does not appear to have been questioned be*75fore the master, although he disclosed his interest on the same examination. But admitting the objection to be in season, for the reasons already stated, it affords no ground for interfering with the report or the decree.
The only remaining question is whether the relief, given is compatible with the pleadings and issues in the cause. The decree proceeds upon the ground that Livingston and Van Rensselaer was both sureties for Burroughs' in the bond given to Brockholst Livingston. The bill, it is said, alleges that the debt to Brockholst Livingston was the joint debt of Burroughs and John Livingston, and that the complainant Van Rensselaer united in the bond as their surety only, while the answer asserts that it was the debt of Van Rensselaer and Burroughs, and that Livingston was surety for them both. It will be recollected that the bill was filed by the administrators of Van Rensselaer after his death, and that it sought discovery as well as relief. The position which is so often found in the books, that the plaintiff must have his decree according to the form of his bill, does not mean that he can have no decree unless he makes out in proof the precise case stated in his bill, but merely that the relief given must be within its general scope and equity. It very seldom occurs that either party is entirely right or entirely wrong in his claims or pretensions. The great business of a court of equity is to weigh these conflicting claims, to ascertain from the pleadings and the proofs what are the substantial rights of the parties, and to decree accordingly. A complainant files his bill for an account in relation to various transactions, claiming a large balance; the proofs sustain his claim only in part; he is entitled to a decree for that amount. The principle in equity must be substantially the same as at law; the issue may be more or less general and comprehensive; the proof must be confined to the issue, and the recovery may be of the whole or a part of any demand embraced within the issue, according to the evidence. Here the complainants, when they filed their bill, supposed that the debt which their intestate had paid to Brockholst Livingston was the joint debt of Burroughs and John Livingston the defendant, *76and that they had therefore a right to demand from the defendant a re-payment of the whole. It was shewn, howevev> by the answer and the proofs, that it was not the debt of ^°bn Livingston, but that he was surety as well as Van Bensselaer, and was responsible therefore only for a moiety instead of the whole of what the intestate had paid. Upon the hearing, therefore, the complainants claimed only a contribution from Livingston as co-surety. The decree establishing that claim was clearly within the general scope and equity of the bill, and within the issue joined between the parties. James v. McKernon, 6 Johns. R. 543. 2 Atk. 141. 3 id. 182. 2 Ves. sen. 225. Mitford, 34, 44. A bill for the specific performance of an agreement is like an action at law upon a special contract: the party must prove the agreement precisely as it is laid; 5 Ves. 442; 6 id. 548; but the rule rests upon considerations peculiar to that class of cases, and is confined to them.
My opinion therefore is that the decree of the chancellor should be affirmed.
In which opinion Chief Justice Savage and Mr. Justice Makcy and eighteen senators concurred. Two senators dissented ; they being of opinion that the decree of the chancellor ought to be reversed.
Whereupon the decree of the chancellor was affirmed, with costs,