SR Calc Help

Documentation & User Guide

Overview

SR Calc is an unofficial Safety Rating simulator for iRacing. It estimates how your SR (Safety Rating) will change after a session, based on your current SR, the number of laps driven, incidents, and the session type.

SR Calc has two modes:

ModeDescription
Manual Enter your SR, corners per lap, laps, and incidents directly in the main calculator. Best for planning ahead or estimating future sessions.
Session JSON Upload the official iRacing event result JSON file. SR Calc automatically reads all session data and back-calculates the exact lap values used by iRacing, then shows a verified SR result with a CPI match check.

Results are estimates – small deviations from the official iRacing result are possible in manual mode. Session JSON mode compares the calculated CPI against the iRacing value and shows any difference.

Note: SR Calc is not affiliated with iRacing. No guarantee of accuracy.
Manual Calculator

The main calculator lets you enter session data manually and see a live SR estimate as you type.

Session Settings

FieldValuesDescription
Session Type Race / Qualifying / Time Trial The overall type of the iRacing session. Determines which sub-session types are available.
Official Session On / Off A session is official when enough drivers are present. Only affects Race and Heat – Practice and Qualifying always use their fixed multiplier.
Corners per Lap 1 – 200 Number of corners on the track. Found in iRacing's session results page. Applies to all sub-sessions.

Old SR/CPI

FieldDescription
SR Your Safety Rating before the session. Select the license class (R/D/C/B/A/P) and enter the value (0.00–4.99). Example: C 2.34
License Class Shows your current license class and SR as a colored badge. Each license uses a dark tinted background with a colored border and matching light text: R 2.50 D 2.50 C 2.50 B 2.50 A 2.50 P 2.50 When using manual CPI mode, selectable buttons appear for each SR sub-level that matches the entered CPI.
CPI Automatically calculated from your SR. Click the field to switch to manual mode and enter the exact CPI from iRacing – useful when SR is capped at 4.99 but your actual CPI is higher. Press ✕ or Escape to return to auto mode.

Lap/Inc Data

A session consists of one or more sub-sessions. Each has its own type, lap count, and incident count. Use + Session to add a sessions before the Race. The order is maintained automatically: Practice → Qualify → Heat → Race.

ColumnDescription
Sub-Session TypeThe type of this sub-session (e.g. Warm-Up, Qualify - Lone, Race). Determines the SR multiplier.
LapsLaps completed in this sub-session. Fractional values are allowed (e.g. 3.5).
IncIncidents (4x incidents) in this sub-session.
Mult.SR multiplier determined by sub-session type and official flag.
New CPIEstimated CPI after each individual sub-session.

Multiplier reference

Sub-session typeMultiplier
Race / Heat (official)1.00×
Open Practice / Open Qualifying / Warm-Up0.50×
Lone Practice / Lone Qualifying / Time Trial / any unofficial0.35×
Result

The result panel updates live as you type. All values are estimates based on the entered data.

The result panel is laid out in three rows, each following the same column order: Session value left · SR middle · CPI right.

FieldDescription
Ses CornersWeighted corner count: sum of (Laps × CPL × Multiplier) across all sub-sessions. This is what drives the SR formula.
Old SRYour SR before the session, shown with the license color.
Old CPIYour CPI at the start of the session.
Ses IncsWeighted incident count: sum of (Inc × Multiplier) across all sub-sessions.
New SREstimated SR after the session, shown with the new license color.
New CPIEstimated CPI after all sub-sessions.
Ses CPIThe effective CPI of this session alone. ▲ above Old CPI = session was cleaner than your history. ▼ below = more incidents than usual. 👍 = no incidents at all.
SR ChangeDifference between old and new SR. ▲ SR went up, ▼ SR went down.
CPI ChangeChange in CPI. ▲ CPI improved (fewer incidents relative to corners), ▼ CPI worsened.
Comparison List

The Comparison section appears below the result whenever at least one entry has been added via the + Compare button. It lets you compare multiple scenarios side by side – for example the same session with different incident counts, or different SR starting values.

Columns

ColumnDescription
Old SR/CPIStarting SR and CPI of that entry, shown as a colored license badge with the new iRacing-style: dark tinted background, colored border, light text. Example: B 2.34 / 28.77
CornersWeighted session corner count (Laps × CPL × Multiplier summed across sub-sessions).
IncsWeighted incident count (Inc × Multiplier summed across sub-sessions).
Ses CPIEffective CPI of the session alone. ▲ above Old CPI = cleaner than history, ▼ below = more incidents than usual, 👍 = no incidents.
New CPICalculated CPI after the session, followed by the change (+1.06 / -2.02).
New SRResulting SR as a colored badge including the SR change. Same text-color rules as Old SR.

Click ✕ Clear to remove all entries, or the individual ✕ button on a row to remove a single entry.

Session JSON Analyzer

The Session JSON mode (accessible via the button in the top-right of the Session section) reads the official iRacing event result file and automatically calculates your exact SR change – no manual entry required.

How to get the JSON file

Go to the iRacing results page for your session. At the bottom left of the page there is a Download JSON button. Click it to save the event result file to your computer. The file contains the complete session data for all drivers, including their exact CPI values before and after the session.

Tip: The JSON file includes the real old_cpi and new_cpi values recorded by iRacing. SR Calc uses these to back-calculate the exact lap counts and verify the result against the official numbers.

Step-by-step workflow

StepDescription
0. iR Result Click ⊞ iR Result to open the iRacing session result page directly in a new tab. If a YAML file is already loaded, the SubSession ID is taken from it automatically. If a JSON is already loaded, its SubSession ID is used. Otherwise a prompt asks for the ID manually. On the iRacing result page, use the Download JSON button at the bottom left to save the event result file.
1. Upload Click or drag the downloaded JSON file onto the upload area. SR Calc parses the file and shows session info (series, track, season, official status, car classes). If a YAML was already loaded before the JSON, the batch check runs automatically once the JSON is parsed. Click ▼ Show Log to see detailed parsing output.
2. Select Driver Click any driver in the list to select them. Drivers are sorted by old CPI descending. Each entry shows their old and new SR/CPI from the iRacing data. After a YAML batch check, two match symbols appear to the right of the new SR/CPI badge – the left one for SR, the right one for CPI. Selecting a driver immediately triggers the back-calculation.
3. Sub-Sessions The table shows all sub-sessions the driver participated in, with the back-calculated lap values needed to reproduce the iRacing CPI result.
Result The calculated CPI and SR are shown alongside the actual iRacing values with a match indicator. Session statistics (Session Corners, Session Inc, Session CPI, CPI Change, SR Change) are also shown.

Sub-session table columns

ColumnDescription
TypeSub-session type as reported by iRacing (e.g. Open Practice, Lone Qualifying, Race).
Laps complLaps completed as recorded by iRacing (laps_complete). Always an integer. Note: iRacing increments this each time a new lap begins, including partial laps after a pit reset, so this can exceed the number of full laps actually driven.
+OffsetThe difference between Laps calc and Laps compl. The back-calculation finds the exact offset that makes the final CPI match the iRacing value.
Laps calcThe precise lap count used in the SR formula, found by binary search. Shown in green. This value is used when opening the manual calculator.
IncIncidents recorded in this sub-session.
MultSR multiplier for this sub-session type.

Result fields

The result follows the same column order as the manual calculator: Session value left · SR middle · CPI right.

FieldDescription
New SRCalculated SR with license color badge. Below it the API value is shown in color: green = exact match, yellow = diff ≤0.01, orange = diff ≤0.02, red = diff >0.02. The diff shows API−calc, so a negative value means the API result is lower than calculated.
New CPICalculated CPI. Below it the API value is shown in color: green = displayed values identical (2 decimal places), yellow = diff ≤0.1%, orange = diff ≤0.5%, red = diff >0.5%.
Ses CPIEffective CPI of this session alone. ▲ cleaner session than your history, ▼ more incidents than usual, 👍 = no incidents.

Navigation buttons

ButtonDescription
⊞ iR ResultOpens the iRacing result page for the session in a new tab. Uses the SubSession ID from the loaded YAML or JSON automatically; otherwise prompts for it. Use the Download JSON button on that page to get the event result file.
← Back to SR CalcReturns to the manual calculator. Always visible.
↩ Apply to SR CalcOpens the manual calculator in the same tab, pre-filled with SR, CPI, CPL, and all sub-sessions with their exact back-calculated lap counts. Appears after a successful calculation.
🌐 Open in new TabSame as Apply, but opens in a new tab, keeping the Session JSON page open.
YAML Import (Exact Lap Data)

In addition to the event result JSON, SR Calc can import an iRacing SDK YAML file. The YAML contains the exact LapsDriven value for each driver per sub-session as recorded live by the iRacing simulator – a fractional number that represents the true distance driven, including partial laps.

When a YAML file is loaded alongside a JSON file, the back-calculation switches from binary search to using these exact values directly. This produces a more accurate and deterministic result, and allows SR Calc to verify every driver in the session at once.

How to get the YAML file

The YAML file is generated by the iRacing SDK and is only available if you use a third-party tool that captures it during a live session (e.g. Crew Chief, iRacing YAML Extractor, or any app using the iRacing SDK). It is not available from the iRacing results website. The file is typically named after the session or saved automatically by the tool in use.

Note: The YAML file is only useful in combination with the matching JSON file. SR Calc checks the SubSessionID in the YAML against the JSON and shows a match indicator (✅ or ⚠) next to the filename.

How to upload

Drag both the JSON and YAML file onto the upload area at the same time, or upload them one after the other — in any order. SR Calc always processes the JSON first so that the YAML batch check can run immediately after. When both files are loaded and their SubSessionID matches, the batch check runs automatically for all drivers. If you load the YAML first and the JSON afterwards, the batch check also starts automatically once the JSON is parsed. Accepted YAML file extensions: .yaml, .yml, and .txt (some tools save the iRacing SDK output as a plain text file).

To remove the YAML data without unloading the JSON, click the ✕ YAML button in the top-right of the upload card. The calculator then falls back to binary search mode.

Effect on the sub-session table

When YAML data is available for the selected driver, the sub-session table changes its column layout:

ModeColumns shown
Without YAML Type · Laps compl · +Offset · Laps calc · Inc · Mult
With YAML Type · Laps compl · Laps Driven · Inc · Mult

The Laps Driven column shows the exact fractional lap count from the YAML. Sub-sessions where the driver did not participate (LapsDriven = 0) are greyed out and excluded from the calculation.

Driver checkmarks

When a matching YAML file is loaded, SR Calc automatically runs a batch check for all drivers in the session. Two symbols appear to the right of each driver's new SR/CPI badge – the left one for SR accuracy, the right one for CPI accuracy. Each symbol uses a four-level colour scale:

SymbolSR thresholdCPI threshold
⏳Batch check in progress.
☑Exact match (API flag)Displayed values identical (2 dp)
☑Diff ≤ 0.01Diff ≤ 0.1%
⚠Diff ≤ 0.02Diff ≤ 0.5%
⚠Diff > 0.02Diff > 0.5%

Drivers without YAML data (e.g. spectators, or drivers not captured by the SDK) fall back to binary search for the batch check.

URL Parameters

Pre-fill the manual calculator by adding parameters to the URL. The Copy URL button generates a shareable link with your current settings. The Session JSON navigator buttons also generate URLs with the exact back-calculated lap data.

ParameterExampleDescription
srsr=C2.34SR string – license letter directly followed by value. No space needed.
cplcpl=12Corners per lap.
oo=1Official session: 1 = official, 0 = unofficial.
ss=rSession type: r Race, q Qualifying, tt Time Trial.
cpicpi=43.21Manual CPI override. Activates manual CPI mode and selects the closest matching SR sub-level.
ssss=ql,3.5,0Sub-session: type,laps,inc. Repeat the parameter for multiple sub-sessions.

Sub-session type shortcuts

ShortFull name
wWarm-Up
plPractice - Lone
poPractice - Open
qlQualify - Lone
qoQualify - Open
hHeat
rRace

Example URL – Race session with Open Practice, Lone Qualifying, and Race sub-sessions with manual CPI:

https://sr-calc.de/?sr=B2.34&cpl=15&o=1&s=r&cpi=28.77&ss=po,0.5,0&ss=ql,3.5,0&ss=r,10.5,5
← Back to Calculator