*813Mark Corrinet (plaintiff) appeals from a judgment dismissing his lawsuit for failure to prosecute. ( Code Civ. Proc., §§ 583.410 - 583.430.)1 Plaintiff contends this discretionary dismissal was error when, among other things, a trial date had been set pursuant to the parties' stipulation and the case was ready for trial. We reverse the judgment.
I. THE DISCRETIONARY DISMISSAL STATUTE
Section 583.410, subdivision (a) provides that a "court may in its discretion dismiss an action for delay in prosecution ... if to do so appears to the court appropriate under the circumstances of the case." This discretion is qualified by section 583.420, subdivision (a), which states that a court may not dismiss an action for delay in prosecution unless one of the specified "conditions has occurred." ( Roman v. Usary Tire & Service Center (1994) 29 Cal.App.4th 1422, 1430, 35 Cal.Rptr.2d 329.) Pertinent here, a discretionary dismissal is authorized when the action "is not brought to trial within ... [t]hree years after the action is commenced against the defendant." (§ 583.420, subd. (a)(2)(A).)
California Rule of Court 3.1342 ( rule 3.1342 ) provides that a proper determination of a motion to dismiss for delay in prosecution involves consideration of the following: "(1) The court's file in the case and the declarations and supporting data submitted by the parties and, where applicable, the availability of the moving party and other essential parties for service of process; [¶] (2) The diligence in seeking to effect service of process; [¶] (3) The extent to which the parties engaged in any settlement negotiations or discussion; [¶] (4) The diligence of the parties in pursuing discovery or other pretrial proceedings, including any extraordinary relief sought by either party; [¶] (5) The nature and complexity of the case; [¶] (6) The law applicable to the case, including the pendency of other litigation under a common set of facts or determinative of the legal or factual issues in the case; [¶] (7) The nature of any extensions of time or other delay attributable to either party; [¶] (8) The condition of the court's calendar and the availability of an earlier trial date if the matter was ready for trial; [¶] (9) Whether the interests of justice are best served by dismissal or trial of the case; and [¶] (10) Any other fact or circumstance relevant to a fair determination of the issue."
When presented with a motion for discretionary dismissal, the trial court is required to consider the rule 3.1342 factors. ( Van Keulen v. Cathay Pacific Airways, Ltd . (2008) 162 Cal.App.4th 122, 130-131, 75 Cal.Rptr.3d 471 ( Van Keulen ).) On appeal, we review the trial court's ruling for abuse of discretion. ( Denham v. Superior Court (1970) 2 Cal.3d 557, 563-564, 86 Cal.Rptr. 65, 468 P.2d 193 ; Blank v. Kirwan (1985) 39 Cal.3d 311, 331, 216 Cal.Rptr. 718, 703 P.2d 58 ; Van Keulen, supra, 162 Cal.App.4th at p. 131, 75 Cal.Rptr.3d 471.) We will not substitute our opinion for that of the trial court absent a clear abuse of discretion and a miscarriage of justice. (Ibid .)
II. PROCEDURAL SUMMARY
A. Background
On February 27, 2013, plaintiff filed the underlying action against four individuals *814and two out-of-state corporations (defendants), seeking damages and injunctive relief for breach of fiduciary duty and conversion. Plaintiff, an attorney acting in pro per, alleged the following facts: he is the former president and CEO of six LLC corporations, including the two corporate defendants, and owns interests in each of them. In December 2009, he resigned his positions from these companies because of unspecified illegal conduct by one of the individual defendants, who subsequently attempted to "purchase back" plaintiff's ownership units. When plaintiff refused to sell, defendants breached their fiduciary duties by diluting the value of plaintiff's units and otherwise attempting to "extort relinquishment" of his ownership interests in the companies.
On May 1, 2013, attorney Howard Mencher filed a general denial answer to plaintiff's complaint on behalf of five of the six defendants, which asserted 29 affirmative defenses. On May 14, Mencher filed a separate general denial answer asserting the same affirmative defenses on behalf of the sixth defendant.
In July 2013, the first case management conference was held before the Honorable Steven Austin, who monitored the action for approximately one and a half years. In their case management statements, both sides stated they were agreeable to mediation and both anticipated that the case was too complex to be ready for trial within 12 months. Defendants pointed out the claims involved copious documents and required numerous depositions, some out of state. Plaintiff advised that there were three related cases pending in the county, and stated he planned to file a motion to consolidate this case with at least one other pending matter.
In November 2013, the court held another case management conference. Defendants reported they had propounded a second round of written discovery and once it was completed, there would be depositions in California and Oregon. Defendants also stated there had been a delay in the case because plaintiff had been ill since July. The minute order from this conference stated that the court was informed this case involved "massive discovery," and that motions would be filed. Noting that there were related cases, the court stated it would consider mediation at the next status conference.
The next conference was held in February 2014. In a statement filed before the conference, defendants reported that a motion to coordinate this case with cases pending in another department had been denied. Plaintiff's health issues had not resolved, but the parties anticipated exchanging discovery responses soon. At the conference, the court observed that the related cases, which involved the same set of defendants, had been re-assigned to the same department as the present case, and it suggested coordinating discovery. Defense counsel did not agree to that proposal.
At a conference in June 2014, defendants reported they granted plaintiff an extension to respond to their second round of discovery because of his health issues. Plaintiff reported there were "thousands of pages" of documents to review and that the four related cases had "extensive cross-discovery issues."
In December 2014, the court held another case management conference. Prior to the hearing, plaintiff sought guidance about two issues. First, he had responded to a document production request by giving defendants access to 8,000 pages of documents, but there was another set of documents that he did not know how to handle because one defendant was claiming a prior attorney-client relationship with plaintiff, which raised confidentiality *815concerns. The other issue pertained to the fact that attorney Mencher was representing all defendants in all the related cases. Plaintiff reported he was co-counsel in the three related cases, and that settlement offers had been made. However, Mencher had not responded to any offer, which led to a concern that he had a conflict of interest. At the conference, the parties were advised that beginning in 2015, this case would be assigned to the Honorable Judith Craddick.
The next case management conference was held in April 2015, before the Honorable Barbara Zuniga. Plaintiff appeared for himself, Mencher appeared for defendants, and attorney Grover Perrigue appeared on behalf of a plaintiff in a related case. According to the minute order, the three related cases were also on the court's calendar. The court summarized the discovery dispute and then referred the case to court mediation to be completed by August 11. The parties were advised that the next hearing would be a trial setting conference on August 27, so status reports would not be required.
On June 17, 2015, defense counsel Mencher sent a letter by fax to Judge Craddick requesting that the court vacate the referral to mediation in this case and the three related cases. Mencher reported that the parties had agreed on a mediator and had two pre-mediation phone conferences followed by an exchange of emails. However, the communications became so "hostile, contentious and volatile" that defendants changed their mind about any benefit of mediation. Moreover, defendants and counsel lived out of town or in other states, thus making further efforts to mediate "a significant waste of time and money." On June 19, 2015, Judge Craddick set aside the referral to court mediation.
On August 18, 2015, Judge Craddick presided over a case management conference for the four related cases. The minute order from that unreported hearing stated: "Based on the Status Report filed, 8/18/15, by counsel for plaintiffs in case C13-00592 this case is re-referred to Court Mediation." In a separate notice, the court extended the timeline for completion of mediation in all four cases to November 30, 2015 and scheduled a trial setting conference for December 11, 2015.
On February 26, 2016, mediator John Warnlof sent a letter to Judge Craddick. Warnlof stated that he had been asked to "serve as mediator in the[ ] four inter-related cases," but he had been "unsuccessful in scheduling a mutually agreed upon date for the mediation." Accordingly, Warnlof requested that the court vacate his appointment.
On March 17, 2016, plaintiff and Mencher appeared before Judge Craddick for a trial setting conference in the present case only. Mencher stated there was agreement to mediate with John Warnlof, but he needed to resolve issues regarding an agreeable date and who needed to attend. Plaintiff stated that he intended to file a motion in one of the related cases to extend the five-year statutory deadline for bringing a case to trial (§ 583.310). Mencher declined to stipulate to an extension, stating he "need[ed] time to discuss the issue with his clients." The court ordered the parties to meet and confer to resolve issues about setting a mediation date and discuss extending the five-year statute in the related case. The hearing was continued to July 15, 2016.
At the July 2016 hearing, plaintiff reported that two of the related cases were in an active discovery phase, there were thousands of documents to review, and he planned to file a summary judgment motion after discovery was completed. A long cause jury trial date was set for June 26, 2017.
*816In March 2017, plaintiff paid jury fees in advance of trial. The following month, he filed a motion by stipulation to change the trial date. The motion was supported by plaintiff's declaration and a letter from his doctor, which described plaintiff's health problems and explained why he was unable to participate as a witness at trial or practice law for a minimum of at least three months. The motion was also supported by a stipulation signed by plaintiff and Mencher pursuant to which the parties agreed that plaintiff would not provide legal representation to a named individual who was a plaintiff in related litigation, and that the trial date in this case would be reset for January or February of 2018.
On April 26, 2017, the trial court re-set the trial date to January 22, 2018. According to the order signed by Judge Craddick, this change was made pursuant to an "application of all the parties," was supported by the parties' stipulation, and was based on a finding of "good cause." The discovery cut-off and expert witness dates were re-set accordingly and a pending motion to continue the trial date was vacated.
In September 2017, Grover Perrigue replaced plaintiff as counsel of record in this case and plaintiff associated in as co-counsel. In October, attorney Donald Schwartz accepted a limited scope representation of plaintiff to handle motions to disqualify Mencher and to compel discovery. A few days later, on October 27, plaintiff filed a substitution of attorney pursuant to which he replaced Perrigue as counsel of record and resumed his pro per status.
On November 7, 2017, plaintiff filed an ex parte application for an order shortening time to file a motion to waive the five-year statute for bringing the action to trial due to the fact that Perrigue had suffered a stroke and underwent heart surgery necessitating his unanticipated withdrawal as plaintiff's trial counsel. The application was supported by an attorney declaration from Schwartz, who stated that he was not in a position to represent plaintiff at trial, that Perrigue was unable to assist in any capacity, and that Mencher refused to stipulate to a continuance of the trial date. Schwartz also submitted a doctor's letter, which confirmed that Perrigue had a stroke and surgery and reported he was experiencing cognitive/memory difficulties.
On November 7, 2017, plaintiff's ex parte application for an order shortening time was denied without explanation.
B. The Motion to Dismiss
On December 7, 2017, defendants filed an ex parte application for an order shortening time to file a motion to dismiss this case, which was supported by an attorney declaration from Mencher. According to Mencher, plaintiff had engaged in "extraordinary delay in moving this case towards trial," as demonstrated by the following circumstances: "For almost five years, [plaintiff had] done virtually nothing to move this case forward other than to file a first set of form interrogatories-general-and a first document request"; mediation efforts were "totally unsuccessful"; and plaintiff requested the stipulation to change the trial date from June 2017 to January 22, 2018.
In his declaration, Mencher also stated that this case was one of four cases in which plaintiff had played a leading role. Mencher acknowledged that two cases had been settled but characterized the settlements as "minimal." He further opined that this case was comparable to the fourth related case, which was dismissed for failure to prosecute. According to Mencher, Judge Craddick dismissed that case "for failure to work up the case for over four years and for not having a representative of the deceased Plaintiff, who *817died almost two years ago, substituted into the case."
Defendants' ex parte application for an order shortening time to bring their motion was directed to the attention of the Honorable Barry P. Goode but was granted by Judge Craddick. The court allowed the motion to be filed on shortened notice, and gave plaintiff until 12:00 noon on December 18, 2017 to file opposition.
Plaintiff objected to the order shortening time and opposed the motion to dismiss on the merits, denying that he failed to prosecute this case and pointing out that a stipulated trial date had been set within the five-year deadline. In a supporting attorney declaration, Schwartz stated that plaintiff had paid non-refundable jury fees, demanded exchange of expert witness information and disclosed his experts, and was otherwise ready for trial notwithstanding the fact that the defendants had never responded to plaintiff's properly served discovery requests. Schwartz also pointed out that the defendants failed to disclose any experts.
A hearing on the motion to dismiss was scheduled for December 20, 2017, before Judge Craddick. The court issued a detailed tentative ruling granting the motion. Neither party appeared at the hearing, so the court adopted its tentative ruling and dismissed this action. In its order, the court acknowledged that a trial was set to begin a month before the five-year deadline for bringing a case to trial. (See § 583.310.) Nevertheless, the court stated it was dismissing the action for delay in prosecution pursuant to the criteria set forth in rule 3.1342. As support for its ruling, the court summarized the procedural history of the case, highlighting the following facts:
(1) After the complaint was filed and answered, plaintiff did "virtually nothing to prosecute this case other than to appear at Case Management Conferences."
(2) In April 2015, "this judge" held a Case Management Conference where the parties reported discovery issues and the case was referred to mediation to be completed by August, so a trial date could be set at the next conference, but before that conference the mediation referral was vacated at defense counsel's request.
(3) In August 2015, the court again referred this case to mediation, "based on the Status Report plaintiff filed that date."
(4) In March 2016, the parties had not yet scheduled a mediation notwithstanding the fact that plaintiff was aware of the five-year deadline and that defense counsel had refused to stipulate to an extension of that deadline in a related case.
(5) In July 2016, the court set the trial for June 26, 2017. "There is no record that plaintiff asked for an earlier date."
(6) The initial trial date was vacated pursuant to a stipulation that was requested by plaintiff and the trial date was reset for January 2018.
(7) In September and October 2017, plaintiff was represented by a different attorney, but he then became pro per again.
(8) In November 2017, plaintiff's limited scope counsel filed an application for an order shortening time on a motion to waive the five-year statute, which the court denied.
The court concluded that these facts demonstrated plaintiff's lack of diligence in bringing the case to trial, citing three reasons. First, there was no indication in the record that the plaintiff asked for a trial date earlier than the one ultimately set by the court despite the fact that the court's docket would have accommodated a trial as early as two years after the complaint was *818filed. Second, plaintiff represented that this case involved "massive" discovery, which "never materialized." Third, plaintiff filed no declarations justifying any significant period of delay during the five years the case was pending. Under these circumstances, the court concluded there was no "reason why this case should not be dismissed," and that dismissing plaintiff's action furthered the purpose of the discretionary dismissal statute to expedite the administration of justice.
III. DISCUSSION
Because plaintiff did not bring his case to trial within three years after filing his complaint, the trial court had discretion to dismiss the action for lack of prosecution. (§ 583.420, subd. (a)(2)(A).) That discretion was broad, and we must presume it was exercised correctly. ( Landry v. Berryessa Union School Dist. (1995) 39 Cal.App.4th 691, 698, 46 Cal.Rptr.2d 119.) Thus, for example, we will defer to the court's factual determinations when the evidence is in conflict even if we might have reached a contrary result. ( Shamblin v. Brattain (1988) 44 Cal.3d 474, 478-479, 243 Cal.Rptr. 902, 749 P.2d 339.) However, trial court discretion is not unfettered. ( Cordova v. Vons Grocery Co. (1987) 196 Cal.App.3d 1526, 1535, 242 Cal.Rptr. 605.) A proper exercise of discretion must not be arbitrary, must conform with the spirit of the law, and must be applied in a way that is consistent with substantial justice. ( Ibid. ; Longshore v. Pine (1986) 176 Cal.App.3d 731, 737, 222 Cal.Rptr. 364.)
Here, the trial court made material findings that are not supported by the evidence, beginning with its key finding that plaintiff did virtually nothing to prosecute this case other than attend case management conferences. First, it is undisputed that plaintiff served discovery in April and May 2013. Also undisputed is the evidence that plaintiff responded to defendants' discovery by making available at least 8,000 pages of documents, and that he was actively involved in the related cases with cross-discovery issues. Plaintiff also paid jury fees, disclosed his expert witnesses, retained lawyers to assist him and filed a declaration of counsel attesting that he was ready to try this case.
Some findings by the court are supported by evidence but are not indicative of inattention or lack of diligence. For example, the court emphasized that plaintiff did not request a trial date earlier than June 26, 2017. On this record, it is not clear why plaintiff should have requested an earlier date. He had significant health problems, which slowed his pace; he had the set-back of failing to secure court mediation of the four related cases; and discovery was ongoing. In spite of these impediments, we note the undisputed evidence that two related cases were settled.
The court also emphasized that the plaintiff requested the stipulation to re-set the trial date. However, it failed to consider that plaintiff requested the stipulation because of documented medical problems that prevented him from participating as a witness at trial; that as part of the stipulation, defendants extracted a promise from plaintiff that he would not act as counsel for a plaintiff in a related matter; and that the motion to postpone the trial date was granted pursuant to a judicial finding of good cause. In light of these undisputed facts, using the stipulation to justify dismissing this case looks arbitrary.
It seems that the court also faulted plaintiff for making an application for an order shortening time to move for a waiver of the five-year dismissal statute. But it failed to consider undisputed evidence that (1) plaintiff's trial counsel became unexpectedly unavailable after suffering a *819stroke and undergoing heart surgery, and (2) after the application was denied, plaintiff's other retained attorney expressly represented that plaintiff was ready for trial. Nor can we ignore the fact that a month after the court denied plaintiff's application for an order shortening time, it granted defendants' ex parte application for an order shortening time, thus allowing them to bring a last minute motion to dismiss this action without explaining why they did not raise the issue sooner. Indeed, had the trial court not granted defendants an order shortening time, their motion to dismiss for failure to prosecute could not have been heard before the first day of trial, since the 45-day notice period normally required for such a motion expired on the weekend before the Monday, January 22, 2018 trial date.
Aside from the time consumed by discovery and mediation efforts, the most significant impediment to bringing this case to trial sooner was plaintiff's health problems. We recognize that even a "[d]elay attributable to sickness or death of ... the parties is not necessarily excusable." ( White v. Mortgage Finance Corp . (1983) 142 Cal.App.3d 770, 775, 191 Cal.Rptr. 277.) "Each case must be decided on its own peculiar features and facts." ( Ibid. ) The problem here is that the trial court ignored the particular features and facts of this case when it ruled on the motion to dismiss. The defendants acknowledged repeatedly that plaintiff was ill during the discovery phase of the case. Furthermore, contrary to a finding in the discretionary dismissal order, the plaintiff did submit a declaration explaining why his medical problems necessitated a delay in bringing the case to trial. Indeed, the court itself found that plaintiff's documented medical problems constituted good cause to re-set the trial date to January 22, 2018.
In this court, defendants insist that the trial court acted within its discretion. They argue that a failure to exercise reasonable diligence becomes increasingly more difficult to justify as the case moves closer to the five-year dismissal date (citing Farrar v. McCormick (1972) 25 Cal.App.3d 701, 704, 102 Cal.Rptr. 190 ( Farrar )), and they claim that is "exactly what happened" in the present case.
In Farrar , the plaintiff filed an at-issue memorandum two years after the case was filed, stating that discovery was completed, and the case was ready for trial. ( Farrar, supra, 25 Cal.App.3d at p. 703, 102 Cal.Rptr. 190.) Then the court held a settlement conference, which was continued several times until it was ordered off calendar due to plaintiff's non-appearance. After that, there was no activity in the case for 13 months at which point the plaintiff filed a motion to specially set the trial date prior to the five-year deadline. Defendant responded with an application to file a motion on shortened time to dismiss the case for failure to prosecute. ( Ibid . ) The trial court granted the application and the motion to dismiss. Affirming the judgment, the Farrar court found that the plaintiff failed to explain or justify the delay of nearly five years in bringing the case to trial or his complete inaction for the 13-month period before filing his motion to specially set a trial date. The court also rejected plaintiff's challenge to the order shortening time, finding that plaintiff had not objected to the application in the trial court or shown prejudice. ( Id . at p. 705, 102 Cal.Rptr. 190.)
The present case is materially different than Farrar because there are explanations for the amount of time that this case was pending prior to trial. First, the parties agreed from the outset that trial preparation would take extra time because the case was document intensive and required *820extensive discovery. Second, plaintiff spent time attempting to mediate because it provided an opportunity to resolve all the related cases together and because defendants repeatedly represented they were amenable to mediation. Third, the initial trial date was moved pursuant to a stipulation of the parties and a finding of good cause by the trial court.
Perhaps the most crucial distinction between the present case and Farrar is that this case was dismissed notwithstanding the fact that the scheduled trial date was a month away and plaintiff's counsel expressly represented that plaintiff was ready for trial. Indeed, we have found no authority involving a discretionary dismissal under comparable facts. Defendants view this dearth of authority as favorable to them, claiming there is no case restricting a trial court's discretion to dismiss a case simply because a trial date has been set and plaintiff states he is ready for trial. But the pertinent facts are more troubling. First, the court did not just set a trial date, it set that date within the five-year statutory period pursuant to a stipulation and a judicial finding of good cause. Second, not only did the plaintiff state he was ready for trial, but the trial court did not dispute that representation when it dismissed the case on shortened notice just one month before trial.
The court's concern that the "massive discovery" "never materialized" might have justified setting a trial date earlier or refusing further continuances if plaintiff had not been ready for trial on January 22, 2018. But dismissing a case under these circumstances was at odds with the fundamental policy favoring trial on the merits over termination of a case on procedural grounds. (§ 583.130.) To be sure, there are situations when this policy is outweighed by other considerations furthering the purpose of the discretionary dismissal statute, which is to discourage stale claims and expedite the administration of justice. (See e.g. Landry v. Berryessa Union School Dist ., supra, 39 Cal.App.4th at p. 698, 46 Cal.Rptr.2d 119.) However, absent evidence that plaintiff's claim was stale, dismissing his case the month before a stipulated trial date would not expedite the administration of justice.
For all these reasons, we conclude the trial court abused its discretion by dismissing this action. Accordingly, we do not address plaintiff's other claims, including that his constitutional rights were violated.
IV. DISPOSITION
The judgment is reversed. Costs of appeal are awarded to plaintiff.
WE CONCUR:
POLLAK, P. J.
BROWN, J.
Statutory references are to the Code of Civil Procedure, unless otherwise stated.