Documentation & User Guide
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:
| Mode | Description |
|---|---|
| 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.
The main calculator lets you enter session data manually and see a live SR estimate as you type.
Session Settings
| Field | Description |
|---|---|
| Session Type | The overall type of the iRacing session. Determines which sub-session types are available. |
| Official Session | 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 | Number of corners on the track. Found in iRacing's session results page. Applies to all sub-sessions. |
Old SR/CPI
| Field | Description |
|---|---|
| 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.
| Column | Description |
|---|---|
| Sub-Session Type | The type of this sub-session (e.g. Warm-Up, Qualify - Lone, Race). Determines the SR multiplier. |
| Laps | Laps completed in this sub-session. Fractional values are allowed (e.g. 3.5). |
| Inc | Incidents (4x incidents) in this sub-session. |
| Mult. | SR multiplier determined by sub-session type and official flag. |
| New CPI | Estimated CPI after each individual sub-session. |
Multiplier reference
| Sub-session type | Multiplier |
|---|---|
| Race / Heat (official) | 1.00× |
| Open Practice / Open Qualifying / Warm-Up | 0.50× |
| Lone Practice / Lone Qualifying / Time Trial / any unofficial | 0.35× |
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.
| Field | Description |
|---|---|
| Ses Corners | Weighted corner count: sum of (Laps × CPL × Multiplier) across all sub-sessions. This is what drives the SR formula. |
| Old SR | Your SR before the session, shown with the license color. |
| Old CPI | Your CPI at the start of the session. |
| Ses Incs | Weighted incident count: sum of (Inc × Multiplier) across all sub-sessions. |
| New SR | Estimated SR after the session, shown with the new license color. |
| New CPI | Estimated CPI after all sub-sessions. |
| Ses CPI | The 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 Change | Difference between old and new SR. ▲ SR went up, ▼ SR went down. |
| CPI Change | Change in CPI. ▲ CPI improved (fewer incidents relative to corners), ▼ CPI worsened. |
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
| Column | Description |
|---|---|
| Old SR/CPI | Starting 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 |
| Corners | Weighted session corner count (Laps × CPL × Multiplier summed across sub-sessions). |
| Incs | Weighted incident count (Inc × Multiplier summed across sub-sessions). |
| Ses CPI | Effective CPI of the session alone. ▲ above Old CPI = cleaner than history, ▼ below = more incidents than usual, 👍 = no incidents. |
| New CPI | Calculated CPI after the session, followed by the change (+1.06 / -2.02). |
| New SR | Resulting 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.
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.
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
| Step | Description |
|---|---|
| 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
| Column | Description |
|---|---|
| Type | Sub-session type as reported by iRacing (e.g. Open Practice, Lone Qualifying, Race). |
| Laps compl | Laps 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. |
| +Offset | The difference between Laps calc and Laps compl. The back-calculation finds the exact offset that makes the final CPI match the iRacing value. |
| Laps calc | The precise lap count used in the SR formula, found by binary search. Shown in green. This value is used when opening the manual calculator. |
| Inc | Incidents recorded in this sub-session. |
| Mult | SR 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.
| Field | Description |
|---|---|
| New SR | Calculated 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 CPI | Calculated 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 CPI | Effective CPI of this session alone. ▲ cleaner session than your history, ▼ more incidents than usual, 👍 = no incidents. |
Navigation buttons
| Button | Description |
|---|---|
| ⊞ iR Result | Opens 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 Calc | Returns to the manual calculator. Always visible. |
| ↩ Apply to SR Calc | Opens 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 Tab | Same as Apply, but opens in a new tab, keeping the Session JSON page open. |
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.
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:
| Mode | Columns 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:
| Symbol | SR threshold | CPI threshold |
|---|---|---|
| ⏳ | Batch check in progress. | |
| ☑ | Exact match (API flag) | Displayed values identical (2 dp) |
| ☑ | Diff ≤ 0.01 | Diff ≤ 0.1% |
| ⚠ | Diff ≤ 0.02 | Diff ≤ 0.5% |
| ⚠ | Diff > 0.02 | Diff > 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.
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.
| Parameter | Description |
|---|---|
| sr | SR string – license letter directly followed by value. No space needed. |
| cpl | Corners per lap. |
| o | Official session: 1 = official, 0 = unofficial. |
| s | Session type: r Race, q Qualifying, tt Time Trial. |
| cpi | Manual CPI override. Activates manual CPI mode and selects the closest matching SR sub-level. |
| ss | Sub-session: type,laps,inc. Repeat the parameter for multiple sub-sessions. |
Sub-session type shortcuts
| Short | Full name |
|---|---|
| w | Warm-Up |
| pl | Practice - Lone |
| po | Practice - Open |
| ql | Qualify - Lone |
| qo | Qualify - Open |
| h | Heat |
| r | Race |
Example URL – Race session with Open Practice, Lone Qualifying, and Race sub-sessions with manual CPI: