Determine Gain / Loss for Car we sold in '24 used for Business + personal

Trying to determine Gain / Loss of car we sold in 2024 that was bought in 2023, and used for 3 purposes:

 

        Uses / Purpose                                     ’23-‘24 Miles

  1. Personal use                                          4,591
  2. Rental Property Management           1,517
  3. Self Employment                                 1,005

Car costs:                                                                          

  1. Sticker / paid  (2023)               $51,025
  2. Sales Taxes/Fees paid               $4,855
  3. Trade in value applied             $12,500
  4. Sale price (2024)                       $27,600

Depreciation :                                                                  

  1. Taken in 2023                      $5,730
  2. Calc’d per mileage               $723

How do I establish a Gain / Loss out of this?