financial.straight_line_depreciation ==================================== .. py:module:: financial.straight_line_depreciation .. autoapi-nested-parse:: In accounting, depreciation refers to the decreases in the value of a fixed asset during the asset's useful life. When an organization purchases a fixed asset, the purchase expenditure is not recognized as an expense immediately. Instead, the decreases in the asset's value are recognized as expenses over the years during which the asset is used. The following methods are widely used for depreciation calculation in accounting: - Straight-line method - Diminishing balance method - Units-of-production method The straight-line method is the simplest and most widely used. This method calculates depreciation by spreading the cost evenly over the asset's useful life. The following formula shows how to calculate the yearly depreciation expense: - annual depreciation expense = (purchase cost of asset - residual value) / useful life of asset(years) Further information on: https://en.wikipedia.org/wiki/Depreciation The function, straight_line_depreciation, returns a list of the depreciation expenses over the given period. Attributes ---------- .. autoapisummary:: financial.straight_line_depreciation.user_input_useful_years Functions --------- .. autoapisummary:: financial.straight_line_depreciation.straight_line_depreciation Module Contents --------------- .. py:function:: straight_line_depreciation(useful_years: int, purchase_value: float, residual_value: float = 0.0) -> list[float] Calculate the depreciation expenses over the given period :param useful_years: Number of years the asset will be used :param purchase_value: Purchase expenditure for the asset :param residual_value: Residual value of the asset at the end of its useful life :return: A list of annual depreciation expenses over the asset's useful life >>> straight_line_depreciation(10, 1100.0, 100.0) [100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] >>> straight_line_depreciation(6, 1250.0, 50.0) [200.0, 200.0, 200.0, 200.0, 200.0, 200.0] >>> straight_line_depreciation(4, 1001.0) [250.25, 250.25, 250.25, 250.25] >>> straight_line_depreciation(11, 380.0, 50.0) [30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0] >>> straight_line_depreciation(1, 4985, 100) [4885.0] .. py:data:: user_input_useful_years