Trade Holding-Time CSV Calculator
Measure closed-trade durations without mixing in open or invalid records.
Three hypothetical closed trades last 45, 90 and 15 minutes. Total holding time is 150 minutes, the mean is 50 and the median is 45. Their timestamps explicitly use UTC. An additional open record is counted as open and contributes no duration to those closed-trade statistics.
What this helps you check
A few long trades can pull a mean upward even when most trades close quickly. This worksheet calculates elapsed minutes for valid closed records and reports total, mean and median duration. Still-open trades and invalid rows remain separate instead of becoming made-up zero-minute trades.
Elapsed time is measured between timestamps, not trading-session time or exposure-weighted duration. A closing time earlier than its opening time is invalid, and later repeated trade IDs are invalid. With no valid closed trades, duration averages say Not defined.
Your worksheet
No account connection requiredInputs are processed in your browser by this calculator. There is no quote lookup or file upload for the calculation. Site measurement and consent are handled separately by the site's privacy and consent controls.
CSV schema: trade_id (text), opened_at (iso8601), closed_at (iso8601). Header required; comma delimiter. Numeric fields use decimal points. Timestamps require Z or a numeric UTC offset. The original input remains unchanged.
Interactive calculation requires JavaScript. The method and hypothetical worked example below remain readable.
Your result
Calculated from supplied values. See the notes and boundaries before interpreting the result.
Check the example by hand
Three hypothetical closed trades last 45, 90 and 15 minutes. Total holding time is 150 minutes, the mean is 50 and the median is 45. Their timestamps explicitly use UTC. An additional open record is counted as open and contributes no duration to those closed-trade statistics.
- Closed trades
- 3
- Open trades
- 0
- Total holding time
- 150minutes
- Mean holding time
- 50minutes
- Median holding time
- 45minutes
Exact example inputs
{
"csv": "trade_id,opened_at,closed_at\nA,2026-01-01T10:00:00Z,2026-01-01T10:45:00Z\nB,2026-01-01T11:00:00Z,2026-01-01T12:30:00Z\nC,2026-01-01T13:00:00Z,2026-01-01T13:15:00Z"
}The example is invented to demonstrate the method. It is not a current market quote, a provider's fee schedule or verified trading performance.
How the worksheet works
- Require explicit-offset valid opened_at; blank closed_at means still open.
- Closed duration_minutes=(closed_at-opened_at)/60000; negative durations are invalid rows with warnings.
- Distinct trade IDs; later duplicates are invalid.
- Only valid closed records enter duration total/mean/median. No closed trades means display averages as 'Not defined'.
Elapsed time is measured between timestamps, not trading-session time or exposure-weighted duration. A closing time earlier than its opening time is invalid, and later repeated trade IDs are invalid. With no valid closed trades, duration averages say Not defined.
Boundaries to keep in view
- Do not infer time zones from ambiguous local dates.
- Trade grouping and partial exits may differ by provider; one supplied row must represent the user's intended holding interval.
- Duration does not prove profitability or an edge.
Compare resources for this task
Holding-time analysis requires a trade definition and unambiguous timestamps. Execution exports and journal groupings can describe different start and end events; the comparison helps you check that boundary before averaging durations.
Official sources and scope
The sources document formats, mechanisms or record workflows. The arithmetic and editorial comparison on this page use the supplied worksheet definitions.
- TraderSync trade file import
Trade file imports with explicit date format and time zone.
Reference checked 2026-10-01. Consult the source for current product rules. - TraderSync managing executions
Manual trade and execution records, including multiple executions.
Reference checked 2026-10-01. Consult the source for current product rules. - TradeZella generic CSV
Execution-based and trade-history templates, column mapping and crypto category.
Reference checked 2026-10-01. Consult the source for current product rules.