Skip to content
TORNLIFE More

Daily Profit & Expenses

Started by shaixi [3105871] on in Tools & Userscripts.

13 replies · 744 views · thread synced · 11 days ago · View on torn.com
About this thread

Posts archived: 14 / 14 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
14
Discussion span
→
People posting
6
Likes on archived posts
27
Authority score
38 / 100
Historical score
31 / 100
Story score
45 / 100
Engagement score
70 / 100

Mentioned in this thread

shaixi [3105871] ×2

shaixi [3105871]

Daily Profit & Expenses
Are you new trying to work out your daily costs to see if you are really going forwards?
Are you rich with lots of stocks and need a easy way to see your daily profits?
Own a lot of Private Islands and need a way to easily track and resend leases? 
Need away to track your profits and buys, both market and bazaar?

Then this may be just the tool for you!!

 

What It Does

Profit & Expenses Overview

  • Daily income, expenses and net Profit & Loss calculated automatically
  • Estimated weekly, monthly and yearly projections
  • Configurable - toggle trading, museum and company on/off, set your daily Xanax use, tick your point refills (Energy/Nerve/Token) to factor in their cost
  • All settings saved in your browser so they persist between sessions

City Bank Investment

  • Live principal, current value, interest earned and daily profit
  • Progress bar showing how far through your investment you are
  • Days remaining countdown

Properties

  • All your properties with upkeep, rent income and status
  • Only counts upkeep for properties you actually pay for (in use)
  • Quick links to offer rent extensions or lease vacant properties directly from the dashboard

Stock Dividends

  • Full portfolio with correct payout types - cash, items (live market value), points
  • Per payout and daily value for each
  • Progress showing how close each stock is to paying out

Museum Sets

  • Flower and plushie set counts from your display case
  • Total points value based on live points market price
  • Days to next Museum Day countdown and estimated daily value

Company

  • Live company stats for directors - funds, bank, popularity, efficiency, environment, rating
  • Daily income, customer counts, total wages and daily P&L
  • Employee roster with individual stats, effectiveness breakdown and wages
  • Employees tab with full per-player effectiveness metrics

Flying Items & Market Values

  • Live market prices for all flowers, plushies and Xanax
  • Used across the dashboard wherever item values are needed

Trade Overview

  • 24h summary across Item Market, Bazaar, City Shop, Overseas and Auction House
  • Gross sales, net sales, buy spend and net P&L for each channel
  • Combined totals at a glance

Trading Logs

  • Full transaction-level logs for Item Market, Bazaar, City Shop, Overseas and Auction House
  • 24h highlighting, per-item breakdown with quantity, price, fees and net

Individual Crimes

  • Live nerve bar and today's activity
  • Full lifetime crime history, synced and cached automatically - not just the last 30 days
  • Tracks direct cash made from crimes, with any item rewards valued separately at live market price so they never get mixed into your cash total
  • Lifetime attempts, success rate and total money made, plus an estimated daily rate based on your last 30 days
  • 7 day / 30 day / 90 day / 1 year history chart, hover any day for the cash / item / total split
  • Full daily log of exactly how much you made each day, all-time

Organized Crime

  • Tracks every payout you've personally received from completed OCs not the team total, just your own cut
  • Breakdown by scenario (which OCs pay best) and by role (which roles you've played and your typical cut %)
  • Estimated daily income feeds straight into the Profit & Expenses Overview
  • Full daily log of OC payouts, all-time

Xanax & Feathery Hotel Coupons

  • Daily use count and cost at live market price
  • 30-day history chart

Energy Cans

  • Daily usage breakdown by can type with energy gained and cost
  • 30-day history chart

Alcohol

  • Daily usage breakdown by alcohol type with nerve gained and cost
  • Nerve per use
  • Cost per nerve

Point Refills

  • Energy, Nerve and Token refill tracking with cost per refill based on live points price
  • 30-day history chart per refill type

Stat Enhancers

  • Boxing Gloves, Dumbbells, Skateboard and Parachute usage tracked daily
  • Stat gains and cost at live market price per use
  • 30-day history chart per enhancer

Personal History (linked Google Sheet)

  • Optional - link your own copy of the tracking sheet to unlock the History panel
  • Daily snapshots of Bank, Properties, Stocks, Trade, Usage, Museum and Company logged automatically at 23:30 TCT every night
  • View and chart any metric over 7 days, 30 days, 6 months or 1 year
  • All data lives in your own Google Sheet - No one else ever sees it


       


Personal History Tracking (Optional requires one time set up)

Link your own private Google Sheet to track your stats over time:

  • Automatically logs daily snapshots of bank, properties, stocks, trade and usage
  • Tracks actual Xanax use, energy/nerve/token refills pulled from your Torn logs
  • History card in the dashboard with 6 tabs and a chart showing 7D / 30D / 6M / 1Y trends
  • Runs automatically at 23:30 TCT every day — no manual effort needed
  • Your data stays in your own Google account — the dashboard never stores anything and only you have access to it
  • One time set up then done(Setup Guide below post)

 

Security & Privacy

  • Your API key goes directly to Torn's servers — never stored on any server
  • Credentials(API KEY) saved locally in your browser only (same as TornTools)
  • Player ID only used to validate access
  • No ads, no tracking, no data collection
  • Limited Access API Key for Stocks and property's
  • Full Access API Key Needed for full trade data

Access Tiers

Tier Who Cost
Owner Shaixi —
Permanent Invited by me —
Faction Maelstrom Syndicate members Free
Monthly Anyone 1x Xanax per 30 days

Send 1 Xanax to shaixi [3105871] and your access is added automatically within the hour. Each additional Xanax stacks 30 more days on top.
Contact me with any issues. 

If you try the tool and would like permanent access price can be discussed.

Links



History Sheet setup guide will be below post

 

Updates and fixes

I appreciate all the help so far in identifying issues and plan to fix and expand upon it in that order I will prioritise fixing issues first.

 

I however only really have 1-2 days per week that I can dedicate real time to it, as such I apologise if I am slow in addressing the issue, but know I do plan to keep refining this tool into the future so if you have any problems or just some suggestions that you might like to see added in the future please shoot me a message and I'll add it to my to do list.

Patch Notes
Patch 1 BUG FIXES - 23/24 March 2026 
Patch 2 MAJOR UPDATE - 27 March 2026
Patch 3 Minor Frontend update and History Sheet Rebuild 28 March 2026 
Patch 4 Crimes and OC

 

Known Issues 

[FIXED]-Properties adding spouses to list as access is counted as shared and only shown a max of 20 owned Properties (need to swap to pagination for API calls and refine filtering method)

[FIXED]-Private islands that are rented and then lived in counted as profits not costs, works for owners living in there own PI

[FIXED]-TCI stock calculation incorrect 

[FIXED]-google sheets History Tracking needs to be rebuilt with seamless updates in mind so new updates won't require a fresh Sheet or manual redeployment from the users, and keep there old data intact,  not sure about how to do this yet but have some ideas

 

Planned update 

[ADDED]-add logs for money received/sent

[ADDED]-add company overview for directors 

[ADDED]-add job pay for employees 

-expand upon market values to have custom watch lists for items

[1/2 ADDED]-expand/remake Market/Bazaar tracking to be more in-depth with Item look up, longer History Tracking 

[ADDED]-add flying profits break down tracking overseas purchases

[ADDED]-add city shop sales/purchase into the Daily P&L

[ADDED]-add tracking for daily E-cans, FHC

[ADDED]-add SE use , need to work out a daily, weekly, monthly system for those with longer intervals on use then daily 

[ADDED]-Stock Dividends need to take passive stocks out of "ready to pay" count and make new passive count

[ADDED]-add plushies and flower sets in its own card, calculate the daily profits from (sets * 11)*Avg points cost))/365 for museum day payout and add configuration toggle in Overview card 

Mentions: shaixi [3105871] · Daily Profit & Expenses

shaixi [3105871]

Personal History Sheet Setup Guide

What You Need

  • A Google account
  • Your Torn API key (the same one you use for the dashboard)
  • Active dashboard access (Faction, Monthly or Permanent tier)

Copy the Template Sheet

Click this link to make your own copy: https://docs.google.com/spreadsheets/d/1BS0SqyhCIgW-IArHfnPyS6bDO7cAEW2FbZ_aI4XJ2t8/copy

Google will ask you to confirm — click Make a copy. The sheet will open in your Google Drive.

Step 1 Add Script Library
The First step is to add the script library to your new copy of the template sheet
Copy the "Library Script ID" in the _Setup sheet it should look like this
"15jj3HEkwOAekZEKoGw1gvvlpqO972luq-s9w_ppMFakDFdaYhWjCb5Au"

Go to the drop down "Extensions" then "APP SCRIPT"
Find the "Library +" and click it
 

Then Add the "Library ID" and click "Look up"
Change the Version to "2"
Click "Add"

After if the "Library ID" has been added correctly the Dropdown menu back in the sheet should change after you refresh the page
FROM

TO


Step 2 Add API, ID and Run Setup

Add your API key and player ID in the cells B1 and B2
Then at the top click the dropdown "Torn Dashboard" and then "Step 1 - Run Setup"

  • Google will ask for permissions — click Review permissions
  • Choose your Google account
  • You'll see a warning: "Google hasn't verified this app" — click Advanced then Go to Torn History Tracker (unsafe)
  • Click Allow

This is standard for Google app scripts feel free to look through the complete script first if you want in extensions app scripts 



Step 3 Deploy and get Web app URL link
At the top click the crop down "Extensions" then "Apps Scripts"

It will load the code at the top right there is a "Deploy" dropdown click it then "New Deployment"

It will load a popup just click "Deploy" in the bottom right corner.

It will then give then give a few links copy the "Web app URL link" it will start with "https://script.google.com/macros/"

Step 4 Add link 
Go back to the google sheet and again click the "Torn Dashboard" drop down click "Step 2 - Register and Get Link Code"
paste the Web app URL into the popup window and then click "ok" 

A popup will show your personal link code — it looks like MS-xxxxxx

Your code is also saved in the _Setup tab at cell B3 in case you need it later.


Step 7 Link to the Dashboard

In the Torn dashboard:

  • Find the Link Personal History Sheet panel
  • Enter your MS-xxxxxx code
  • Click Link Sheet

The History card will appear with all six tabs. It will be empty until the first daily log runs tonight.

How It Works After Setup

Every day at 23:30 TCT (30 minutes before Torn's daily reset) the script automatically:

  1. Checks you still have active dashboard access
  2. Fetches your current data from Torn's API
  3. Logs a snapshot to each daily tab
  4. Reschedules itself for the next day

You don't need to do anything — it runs in the background

 



shaixi [3105871]

Patch Notes - 23/24 March 2026

Bug Fixes
City Bank Investment

  • Switched to Torn API v2 (/v2/user/money) - now uses direct fields Profit, duration, invested_at, until instead of back-calculating from amount and interest rate
  • Investment duration now reflects the actual period selected (1 week, 2 weeks, 1 month, 2 months, 3 months)  was previously hardcoded to 90 days for everyone old code from my first google sheets build
  • Daily profit now correctly calculated as (total interest/full investment duration) fixing inflated figure early in the investment
  • Interest Rate display now shows actual return percentage (profit/principal) instead of the raw APR field from the API which was misleading
  • Progress bar and card meta now show the correct investment period label


Properties

  • Properties are now filtered by owner.id, spouse properties should no longer be included in calculations or shown in the table
  • Added tenant detection, if the player appears in "used_by" on a property they don't own, their cost per day is now tracked as a rent expense not income
  • Fixed upkeep logic, only "in_use" properties owned by the player count as an upkeep cost
  • Rented properties should now correctly count "cost_per_day" as income
  • "for_rent" and "none"(No tenant) properties correctly show no income and no cost
  • Table now has an Owner column showing "yours" or the actual owner's name (May add link to profile in future for messaging to discuss rent agreements)
  • Rent/day column shows green for income (owned + rented out) and red for expense (player is the tenant)
  • Summary row should hopefully now shows a Rent Paid cell when the player is renting from someone else
  • Properties now paginate through all pages was previously capped at 20, now loads up to 500 (If you own more then 500 PIs then f**k me you are rich let me know and I can increase the limit)
  • Profit & Expenses Overview expenses now include tenant rent paid

Stock Dividends TCI

  • TCI (stock ID 2) calculates its value by working backwards from the bank profits field  since Torn's API returns profit with TCI's 10% boost already baked in, the TCI contribution is  "profit / 11"  (simplification of profit - profit/1.10). Cannot fully verify without owning the stock
  • Per Payout shows the total extra interest TCI contributed over the full investment period
  • Est. Daily shows that total divided by investment duration days
  • TCI is excluded from the Est. Daily Total that feeds the Profit & Expenses Overview , the bank daily profit already reflects TCI's contribution since "profit" from the API includes it, so adding it again would count it 2 times
  • TCI still displays Per Payout and Est. Daily in the stock table for reference
  • Added "/v2/user/merits" to the shared pre-fetch  merit ID 7 (Bank Interest I hope still verifying) level stored in cache for future merit aware calculations 

 

API

  • Fixed "fetchTorn" bug, v2 endpoints with no existing query, were getting "&key="  instead of "?key=", causing "Incorrect key" errors for all v2 calls 

 

Financeshane [4018972]

Looks great and the edits will only make it better!

If possible factoring in city shop sales into the Daily P&L would be a great addition. 

shaixi [3105871]

I have added it to the list of planned additions, thanks for the suggestion definitely something worth having that I hadn't thought of.

shaixi [3105871]

Patch Notes - 27 March 2026

Updates

Layout & Navigation

  • added summary bar  Net P&L, Bank,  Properties,  Stocks , Trading , Company always visible
  • split into 5 main tabs Overview, Passive Income , Trading, Company , Usage
  • Tab state persisted in local storage

Profit & Expenses Overview

  • configure menu with additions full local Storage persistence, Trading toggle, Museum toggle, Company toggle, 
  • Larger P&L numbers 28px was 22px
  • All income sources wired: Bank , Properties , Stocks , Money Received , Museum, Company, Trading (Still working on Usage for automation removing the need for parts of teh configure menu)
  • All expense sources: Property upkeep , Money sent , Xanax , Point refills , Trading losses
  • Summary bar always shows raw values regardless of toggle state

 

Passive Income Tab

  • Money Transfers cat=112, 16-row independent pagination per column, player IDs shown
  • Museum Sets(Needs to be in the display case as inventory API is currently disabled)  sets number and bottleneck detection, Est. Daily Value , days to Museum Day, value based on  (sets * 11)*Avg points cost))/365

 

Trading Tab

  • 5 sub-tabs: Item Market , Bazaar, City Shop, Overseas,  Auction House
  • Range selector: Today · 7D · 30D with localStorage persistence
  • Load History button with progress bar (page counter + percentage bar)(Still needs work and will add to History sheet when it is updated for longer history of trade data)
  • 30-day local Storage cache, auto-trim, background incremental updates
  • TCT day boundary (UTC midnight) replaces all 24h rolling windows
  • Overseas profit vs market value per item (green/red) to show the Potential Profit that can be made on selling items bought overseas(Need to add more item IDs as currently only have Flowers/Plushies/Xanax tracked)
  • Trade Overview 6 groups including all 5 trade types + combined

 

Company Tab

  • Auto-detects Director vs Employee via "/v2/user?selections=job"
  • Employee  wage, weekly/monthly/yearly estimates, job points
  • Director  daily income, customers, advert budget, employees, funds, efficiency/popularity/environment bars, P&L row (Total Wages, Daily P&L, Weekly Est, Yearly Est), expandable employee rows with full stat breakdown
  • Company History card Company Stats + Employees tabs from Google sheet(For future update so just a place holder for now)

 

Usage Tab(Still needs work before I wire it into full Overview)

  • Lazy loads on first visit, all sections parallel
  • 30-day history, v2 API with pagination
  • Xanax  uses, cost, energy gained, cost per energy, bar chart
  • Energy Cans cat=31 v2, all-time breakdown table side-by-side with 30D chart
  • Point Refills  3-column grid (Energy, Nerve, Token), individual charts
  • Stat Enhancers 2×2 grid (Parachute, Skateboard / Boxing Gloves, Dumbbells), stat gained per use

Google Sheet Library

  • Began work on code migration to a google app script library for easy future updates but needed to fleshout the dashboard more to better understand all the data that should be tracked, user sheet will use simplified "Bootstrap script" to run new Library code so after new sheet is made user will never need to re make new sheet after first set up regardless of updates 
shaixi [3105871]

Patch Notes - 28 March 2026

Google Sheet Library

 

The daily logging script has been moved from living directly inside each player's Google Sheet into a shared Google Apps script Library hosted by myself.

What this means for players:

  • When you copy the template sheet you now need to link the library once before the dashboard menu appears, instructions are shown automatically when you open the sheet
  • The Library Script ID is pre-filled in your _Setup tab cell B1 for easy copying
  • All future updates to the logging logic happen automatically you should never need to touch your sheet again unless major updates to the tracking happens.

What this means for Me:

  • Bug fixes and new features are pushed once to the library and all players pick them up instantly with no action required on their end
  • The bootstrap script inside each player's sheet stays minimal and rarely needs changing


Usage 

  • Added FHC and info cards when hovering over days in the graphs in Xanax, FHC, E-Cans displaying usage for the day and cost
  • Added cost of E to to all E-Cans and changes Xanax and FHC cost of E to per 25E for per 1E

 

shaixi [3105871]

Just a small progress update so you know it is still being worked on, I am still making a full overhaul of the trading section to be more useful for active traders as well as adding organised crimes income,  and looking into how to add regular crimes income as well.

 

With all that's said progress has been increasing slow because of irl work so can't give an eta on when these updates will be pushed to the live site, thanks for everyone's patience and the helpful feed back I have received.

 

 

shaixi [3105871]

Patch Notes - 30 July 2026


Updates

Crimes Tab (new)

  • New "Crimes" tab added, between Trading and Company
  • Two sub-tabs: Individual Crimes, Organized Crime


Individual Crimes

  • Pulls Crimes 2.0 data straight from log&cat=63 ("Nerve outgoing") - covers every action that spends nerve (success, fail, critical fail)
  • Tracks direct cash only (money_gained/money_lost) - item value from items_gained/items_lost is kept as a fully separate tally, priced at current market value, never mixed into the cash total
  • Full lifetime history synced and cached locally, not just a rolling 30D window - backfills in the background a batch at a time
  • Live nerve bar, lifetime Attempts / Success Rate / Total Money Made, Item Value Lifetime, and a combined Cash + Items Total - the combined figure is what feeds the Overview P&L
  • Est. Daily shown for Cash, Items and Total separately, all based on a fixed 30D window
  • Chart range selector: 7D / 30D / 90D / 1Y, hover breaks a day down into Cash / Items / Total
  • Daily Crime Log - full paginated day-by-day ledger covering the whole synced history, not just whatever the chart is currently showing


Organized Crime

  • Live crew (current OC, your role, ready timer) - personal slot, faction-wide crew/CPR view is planned
  • Payout history pulled from log&cat=161, only "Faction payout money balance receive" (your actual cut) counts as income
  • By Scenario and By Role lifetime breakdowns - count, total, average cut %
  • Same lifetime cache + Daily OC Income Log as Individual Crimes

Alcohol Usage (Usage tab, new)

  • New card next to Energy Cans, pulling log&cat=28
  • Nerve gained is read per-use straight off each log entry instead of assumed - it varies by item depending on job and faction perks
  • By-type breakdown: uses, avg nerve/use, total nerve, cost
  • Cross-linked into the Crimes tab as "Nerve Cost vs Profit" - Alcohol Cost vs Crime Profit (Cash / Items / Total) vs Net, with a jump to Usage tab button

Profit & Expenses Overview

  • New toggles: Include Crimes, Include Organized Crime, Include Alcohol
  • Crimes feed is the combined Cash + Items estimate, labelled "incl. items" in the breakdown so it doesn't get mistaken for pure cash
  • Alcohol shows up as an expense line whenever its Est. Daily cost is non-zero

Bug Fixes

  • [FIXED] Crimes cache could double (or more) count the same log rows on repeat syncs - a loop variable wasn't advancing between pages, so the same page could get re-fetched and re-summed. Replaced with real per-entry id dedup, so a sync can now be re-run any number of times safely
  • [FIXED] "Est. Daily" in Crime Income and "Crime Profit" in Nerve Cost vs Profit could show different numbers - a race between two things loading at once, one could read the shared total before the other had finished updating it
  • [FIXED] Crime/OC chart broke at the 1Y range (7D/30D/90D were fine) - the fixed gap between bars went negative once there were 300+ of them. Gap now scales down as bar count goes up

Known Issues

  • Organized Crime item-based payouts ("Faction payout item receive") aren't tracked yet - OC can pay out items as well as cash, only cash is counted right now
  • Faction-wide Organized Crime tracking (everyone's crews, CPR, slot fills) still needs a faction level key - personal only for now, code is already structured so this can be added alongside without touching the personal tracking in the future 
MrGrownFolk86 [3564948]

Just purchased. I linked it with my THT sheet and Torn HUB in Google Drive. Looking forward to this. Will give a review shortly. Looks promising, Thanks.

Shireikan [4102155]

So it doesn't take into account the trades with other players ? Completely useless for me then, as it's my main source of income..