microsoft book value
microsoft book value
Calling: load
- tickers=["MSFT"], end_date="2026-06-10", start_date="2018-01-01", metrics=["total_shareholder_equity", "total_assets", "total_liabilities"]
DataFrame 219
OK msft_fundamentals (41 rows)
Calling: compute
- name="msft_book_value_summary", dataframe_ids=[219], code="import pandas as pd\ndf = df_219.copy()\ndf['date'] = pd.to_datetime(df['date'])\n# annuals\nannuals = df[df['period_type'] == 'annual'].sort_values('date').copy()\n# latest quarterly if it is after the last annual\nlatest_q = df[df['period_type'] == 'quarterly'].sort_values('date').iloc[-1]\nlast_annual_date = annuals['date'].max()\nif latest_q['date'] > last_annual_date:\n # Append as latest\n latest_df = pd.DataFrame([latest_q])\n latest_df['period_type'] = 'quarterly (latest)'\n result = pd.concat([annuals, latest_df], ignore_index=True)\nelse:\n result = annuals\n\n# Let's extract year or date format\nresult['period'] = result.apply(lambda row: row['date'].strftime('%y') if 'annual' in row['period_type'] else row['date'].strftime('%y-%m (%b)'), axis=1)\nresult = result[['period', 'total_shareholder_equity', 'total_assets', 'total_liabilities']]\nresult = result.set_index('period').T\nresult = result.reset_index()\n"
DataFrame 220
OK msft_book_value_summary (3 rows)
Calling: compute
- dataframe_ids=[219], name="msft_book_value_formatted", code="import pandas as pd\ndf = df_219.copy()\ndf['date'] = pd.to_datetime(df['date'])\n\nannuals = df[df['period_type'] == 'annual'].sort_values('date').copy()\nlatest_q = df[df['period_type'] == 'quarterly'].sort_values('date').iloc[-1]\nlast_annual_date = annuals['date'].max()\n\nif latest_q['date'] > last_annual_date:\n latest_df = pd.DataFrame([latest_q])\n latest_df['period_label'] = 'Q3-26' # Since June is FY end, March 2026 is Q3-26\n annuals['period_label'] = annuals['date'].dt.strftime('FY%y')\n combined = pd.concat([annuals, latest_df], ignore_index=True)\nelse:\n annuals['period_label'] = annuals['date'].dt.strftime('FY%y')\n combined = annuals\n\n# Reorder/select columns\ncombined = combined[['period_label', 'total_shareholder_equity', 'total_assets', 'total_liabilities']]\n\n# Melt or Pivot to have periods as columns\ncombined_transposed = combined.set_index('period_label').T\n\n# Convert values to Billions\nfor col in combined_transposed.columns:\n combined_transposed[col] = combined_transposed[col] / 1e9\n\ncombined_transposed = combined_transposed.reset_index()\ncombined_transposed['index'] = combined_transposed['index'].map({\n 'total_shareholder_equity': 'Total Shareholder Equity (Book Value)',\n 'total_assets': 'Total Assets',\n 'total_liabilities': 'Total Liabilities'\n})\nresult = combined_transposed\n"
DataFrame 221
OK msft_book_value_formatted (3 rows)
Calling: show
- dataframe_id=221
Blob 96
DataFrame 221
OK msft_book_value_formatted (3 rows)
The table below presents Microsoft Corporation's (MSFT) historical book value (Total Shareholder Equity), alongside total assets and total liabilities, covering the last seven fiscal years (ending June 30) plus the latest quarterly data for the period ending March 31, 2026 (Q3-26).
All figures are presented in Billions of USD ($B)
| Metric | FY18 | FY19 | FY20 | FY21 | FY22 | FY23 | FY24 | FY25 | Q3-26 |
|---|---|---|---|---|---|---|---|---|---|
| Total Shareholder Equity (Book Value) | 82.72 | 102.33 | 118.30 | 141.99 | 166.54 | 206.22 | 268.48 | 343.48 | 414.37 |
| Total Assets | 258.85 | 286.56 | 301.31 | 333.78 | 364.84 | 411.98 | 512.16 | 619.00 | 694.23 |
| Total Liabilities | 176.13 | 184.23 | 183.01 | 191.79 | 198.30 | 205.75 | 243.69 | 275.52 | 279.86 |
can you give last ttm lsat 5 years, - revenue, net inclme, op cash flow, capex, total debt, cash
Calling: load
- end_date="2026-06-10", tickers=["MSFT"], metrics=["total_revenue", "net_income", "operating_cashflow", "capital_expenditures", "long_term_debt", "short_term_debt", "cash_and_cash_equivalents_at_carrying_value"], start_date="2020-01-01"
DataFrame 222
OK msft_fundamentals_134014_e48b53 (31 rows)
Calling: compute
- name="msft_ttm_last_5_years", code="import pandas as pd\ndf = df_222.copy()\ndf['date'] = pd.to_datetime(df['date'])\n\n# Fill NaNs with 0\ndf = df.fillna(0)\n\n# Calculate Total Debt\ndf['total_debt'] = df['short_term_debt'] + df['long_term_debt']\n\n# Let's verify we have quarterly rows for TTM calculations\nquarterly = df[df['period_type'] == 'quarterly'].sort_values('date').copy()\n\n# TTM is trailing 4 quarters. \n# Flow metrics to sum over 4 quarters: total_revenue, net_income, operating_cashflow, capital_expenditures\n# Balance sheet metrics to take latest value: total_debt, cash_and_cash_equivalents_at_carrying_value\n\nflow_metrics = ['total_revenue', 'net_income', 'operating_cashflow', 'capital_expenditures']\nbalance_metrics = ['total_debt', 'cash_and_cash_equivalents_at_carrying_value']\n\n# Calculate TTM values for quarterly data\nfor m in flow_metrics:\n quarterly[m + '_ttm'] = quarterly[m].rolling(window=4).sum()\n\n# For balance sheet, TTM is just the current quarter's value\nfor m in balance_metrics:\n quarterly[m + '_ttm'] = quarterly[m]\n\n# Filter to get the periods we want.\n# We want the last 5 years of TTM data. Let's look at the dates.\n# MSFT fiscal year ends June 30.\n# The user wants \"last 5 years TTM\" or \"last TTM last 5 years\".\n# Let's provide the TTM as of June 2021, June 2022, June 2023, June 2024, June 2025, and the latest TTM (March 2026).\n# Note that June quarterly TTM is equivalent to the annual value.\ntarget_dates = ['2021-06-30', '2022-06-30', '2023-06-30', '2024-06-30', '2025-06-30', '2026-03-31']\ntarget_dates_dt = [pd.to_datetime(d) for d in target_dates]\n\nselected_ttm = quarterly[quarterly['date'].isin(target_dates_dt)].copy()\n\n# Let's format the period label\ndef format_label(d):\n if d.month == 6:\n return f\"FY{d.strftime('%y')} TTM\"\n else:\n return f\"LTM ({d.strftime('%b-%y')})\"\n\nselected_ttm['period_label'] = selected_ttm['date'].apply(format_label)\n\n# Keep only the columns we need\noutput_cols = ['period_label', 'total_revenue_ttm', 'net_income_ttm', 'operating_cashflow_ttm', 'capital_expenditures_ttm', 'total_debt_ttm', 'cash_and_cash_equivalents_at_carrying_value_ttm']\nresult_df = selected_ttm[output_cols].copy()\n\n# Rename columns\nresult_df.columns = ['Period', 'Revenue', 'Net Income', 'Operating Cash Flow', 'CapEx', 'Total Debt', 'Cash & Cash Equiv.']\n\n# Transpose\nresult_df = result_df.set_index('Period').T\n\n# Convert to Billions and format\nfor col in result_df.columns:\n result_df[col] = result_df[col] / 1e9\n\nresult = result_df.reset_index()\n", dataframe_ids=[222]
DataFrame 223
OK msft_ttm_last_5_years (6 rows)
Calling: show
- dataframe_id=223
Blob 97
DataFrame 223
OK msft_ttm_last_5_years (6 rows)
The table below details Microsoft's trailing twelve months (TTM) financials over the last five fiscal years (FY21 to FY25, ending June 30) plus the most recent Last Twelve Months (LTM) period ending March 31, 2026.
All figures are presented in Billions of USD ($B)
| Metric | FY21 TTM | FY22 TTM | FY23 TTM | FY24 TTM | FY25 TTM | LTM (Mar-26) |
|---|---|---|---|---|---|---|
| Revenue | 168.09 | 198.27 | 211.92 | 245.12 | 281.72 | 318.27 |
| Net Income | 61.27 | 72.74 | 72.36 | 88.14 | 101.83 | 125.22 |
| Operating Cash Flow | 76.74 | 89.04 | 87.58 | 118.55 | 136.16 | 170.14 |
| CapEx | 20.62 | 23.89 | 28.11 | 44.48 | 64.55 | 97.23 |
| Total Debt (Short + Long-Term) | 60.90 | 53.07 | 50.84 | 62.58 | 51.75 | 40.26 |
| Cash & Cash Equivalents | 14.22 | 13.93 | 34.70 | 18.32 | 30.24 | 32.11 |
(Note: Cash shown above reflects "Cash and Cash Equivalents". Short-term investments, which Microsoft historically holds in substantial amounts, are not included in this cash line).