How the Linearity Calculator turns a standard weight, dilution factors and replicate readings into slope, intercept, r, R² and %Y-intercept, how pass or fail is decided, and what every setting and message means.
Conc. (mg/mL) = Weight of Standard (mg) × Dilution Factor
| Setting | What it does |
|---|---|
| Instrument Type | HPLC (Peak Area) or UV-Vis (Absorbance). The response label changes in the table, results, chart, math log, copy text and print report. UV-Vis also turns on an absorbance range check (see below). |
| Weight of Standard (mg) | The weight taken to prepare the stock standard solution. It must be a valid number, zero or more. |
| Acceptance Limit (min. r) | r ≥ 0.999 (Common Assay Spec), r ≥ 0.998, r ≥ 0.995 (Trace / Impurity Spec), or Custom Limit. It starts at 0.999. A custom limit must be above 0 and no more than 1. |
| Decimal Places (display only) | 2, 3 or 4 places, or Custom Places from 0 to 10. It starts at 3. It changes how slope, intercept and averages are shown, not how they are calculated. |
| System Suitability | An optional block of standard replicate injections, switched on by default. See its own section below. |
| Level (%) | A label for the row. It is not used to calculate the concentration. |
| Dilution Factor | The number, typed for each level, that turns the weight in mg into that level's concentration in mg/mL. The placeholder shows an example of the size of number expected, 0.00835. |
| Reading columns | Three to start with. Each is labelled Peak Area 1, 2, 3 or Absorbance 1, 2, 3. |
Right under the table a live line shows the number of levels, the number of reading columns, and the Target 100% Concentration, which is the weight multiplied by the dilution factor of the level labelled 100.
The calculator fits a straight line by ordinary least squares. It does not fit the individual readings. It fits one point for each level: the concentration on the x axis and the average of that level's readings on the y axis. Levels are put in order of concentration first.
| Result | Formula used | In plain words |
|---|---|---|
| Slope (m) | Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)² | The response gained for each unit of concentration. The page labels it "Response per unit conc." |
| Y-Intercept (c) | ȳ − m · x̄ | The response the line gives at zero concentration |
| Correlation Coefficient (r) | Σ(x − x̄)(y − ȳ) ÷ √[ Σ(x − x̄)² × Σ(y − ȳ)² ] | The strength of the straight-line fit |
| R² | r × r | r squared |
| %Y-Intercept | (Intercept ÷ line response at the 100% level) × 100 | How big the intercept is compared with the response at 100%. Needs a level labelled 100 |
Here x is a level's concentration, y is its average response, x̄ and ȳ are the means over all levels, and n is the number of levels. In the math log the three sums appear as Sxx, Syy and Sxy, and slope = Sxy ÷ Sxx, intercept = ȳ − slope × x̄, r = Sxy ÷ √(Sxx × Syy).
HPLC, weight of standard 25.0 mg, acceptance limit r ≥ 0.999, 3 decimal places. The levels are 80, 90, 100, 110 and 120, with dilution factors 0.0032, 0.0036, 0.0040, 0.0044 and 0.0048.
| Level | Dilution Factor | Peak Area 1, 2, 3 | Average | Conc. (mg/mL) |
|---|---|---|---|---|
| 80% | 0.0032 | 799200, 800900, 799500 | 799866.67 | 0.08000 |
| 90% | 0.0036 | 906100, 907400, 906800 | 906766.67 | 0.09000 |
| 100% | 0.0040 | 1001500, 1002800, 1001900 | 1002066.67 | 0.10000 |
| 110% | 0.0044 | 1107200, 1108500, 1107600 | 1107766.67 | 0.11000 |
| 120% | 0.0048 | 1203600, 1204900, 1203700 | 1204066.67 | 0.12000 |
For the 80% level, the concentration is 25.0 × 0.0032 = 0.08000 mg/mL, and its average is (799200 + 800900 + 799500) ÷ 3 = 799866.67. The math log then gives:
The regression equation reads y = 10094000.000x − 5293.333. The line gives a response of 1004106.67 at the 100% level, so the %Y-Intercept is −5293.333 ÷ 1004106.67 × 100 = −0.53%. The result cards show r as 0.9998 and R² as 0.9997, because r and R² are always shown with at least four decimals. Since 0.99983 is at or above the limit of 0.9990, the banner reads Linearity Passed.
Change the three 110% readings to 1077200, 1078500 and 1077600. That level now averages 1077766.67 instead of 1107766.67. Everything else stays the same, but r falls to 0.9974 and R² to 0.9948, below the 0.9990 limit, so the banner turns red and reads Linearity Failed. One bad level was enough to fail a set that had passed with room to spare.
The calculation is the same for both instruments. Only the labels change, along with one extra check. With UV-Vis selected, every absorbance you enter, in the System Suitability block and in the level cells, must be between 0.00 and 2.0 AU.
Clear Data puts everything back to the starting state: 5 default levels, 3 reading columns, 5 System Suitability rows with the block switched on, the weight emptied, the limit back to 0.999, decimals back to 3, the %RSD limit back to 2.0%, and the results and chart hidden. The instrument type is kept.
Nothing shows until you press Calculate Linearity for the first time. After that, changing the weight, the acceptance limit, the decimal places, the instrument type, the System Suitability switch or its limit refreshes the results straight away. Changing a reading, or adding or removing a level or column, updates only the live Average and Conc. cells. Press Calculate Linearity again after those edits so that r, R² and the chart match the table.
Copy puts a short text on your clipboard, headed Linearity Analysis Profile with the instrument name, followed by r, R², slope, intercept, the regression equation and the %Y-Intercept, and ending with the line "Calculated via BestPharmaTools.com".
Print Report opens an editable A4 preview. It builds a raw data table (level, dilution factor, every reading, the average and the concentration), a System Suitability table with mean, SD and %RSD when that block is on, and a results table with slope, intercept, r, R², the equation and the verdict. A snapshot of the regression chart is included once you have calculated. If you open the report before calculating, the results table shows "Not yet calculated". The header (logo, company, product or API) and footer (signatures) are for you to fill in on the sheet. A switch lets that header field read either Product Name or API, and the Instrument Name is filled in from the HPLC or UV-Vis toggle.
For a logo, choose an image of 1 MB or less and no larger than 512 × 512 px. A larger file or image is rejected with a message.
Enter the weight of the standard in mg, choose HPLC, then fill in one row per level. Each row needs a % Level label, a Dilution Factor and the replicate peak areas. The calculator works out each level's concentration as weight × dilution factor, averages the replicates, fits a straight line through the level averages, and reports slope, intercept, r, R² and %Y-intercept. Press Calculate Linearity to see the result.
By ordinary least squares on the level averages. Slope = Sxy ÷ Sxx and Intercept = ȳ − slope × x̄, where x is the concentration of each level, y is its average response, and x̄ and ȳ are the means of all levels. Sxx is the sum of (x − x̄)², Sxy is the sum of (x − x̄)(y − ȳ), and Syy is the sum of (y − ȳ)².
The pass mark is whatever acceptance limit you select, and the verdict is based on r alone. The drop-down offers r ≥ 0.999 (labelled Common Assay Spec), r ≥ 0.998, r ≥ 0.995 (labelled Trace / Impurity Spec), or a custom limit that you type, above 0 and up to 1. Use the minimum r given in your own method SOP.
R² is r multiplied by itself. Both come from the same regression and both are shown with at least four decimals. The calculator decides pass or fail from r only, so R² is shown for information.
%Y-Intercept is the intercept divided by the response the fitted line gives at the 100% level, multiplied by 100. To find the 100% level the calculator looks for a level whose % Level label is exactly 100. If none of your levels is labelled 100, there is nothing to compare against and the result shows a dash. The value is displayed for your information and has no pass or fail limit in this calculator.
You need at least 2 valid levels to calculate, and the table will not let you remove a level when only 2 are left. You can add as many as your protocol needs with Add Level. Every level has the same number of reading columns, starting at 3. Add Cell adds one more reading column to all levels at once, and the table keeps at least 1 reading column.
No. It is a label only. The concentration of each level comes from the weight of the standard and the Dilution Factor you enter for that row. The label is used to name the level in the tables and to find the 100% level for the %Y-Intercept.
It means every level ended up with the same concentration, so there is no spread along the x axis and no line can be fitted. Check the Dilution Factor values. Each level should have its own.
Not automatically. After the first calculation, changes to the weight, acceptance limit, decimal places, instrument type, or the System Suitability switch or limit recalculate on their own. Typing a different reading, or adding or removing a level or column, only refreshes the live Average and Conc. cells. Press Calculate Linearity again to refresh r, R², slope and the chart.
It is optional. When it is switched on, you enter the standard's replicate injections and the calculator shows count, mean, SD and %RSD, with a tick or cross against your %RSD limit (2.0% by default). It does not change the linearity verdict, and it is left out of the results, the math log and the printed report when you switch it off.
The calculation, chart, copy text and print preview all run in your browser, and the calculator script does not send your entries to a server.
Educational use only. This guide explains how the Linearity Calculator on this site works. It is not a validated system and does not replace your SOPs or your own review. Please read the disclaimer for how to use this site.