A strong linear fit
pairs = 3, 2.5 -0.5, 0 2, 2 7, 8
Result: R² 0.9486 — 94.9% of variance explained
R² (R-squared) measures how much of the variation in the actual values your model explains: 1 minus the ratio of residual error to total variance. 1.0 is a perfect fit, 0 means the model is no better than predicting the mean, and negative values mean it is worse. Paste one "actual, predicted" pair per line.
Enter your values and press Calculate — the result appears here.
pairs = 3, 2.5
-0.5, 0
2, 2
7, 8Result: R² 0.9486 — 94.9% of variance explained
pairs = 1, 1
2, 2
3, 3Result: R² 1.00
pairs = 1, 5
2, 6
3, 7Result: R² negative — predictions worse than just using the average
The proportion of the variation in the actual values that the model accounts for. R² = 0.95 means the model explains 95% of the variance; the remaining 5% is unexplained error.
Yes. R² is negative when the model is worse than simply predicting the mean of the actuals for every point — the residual error exceeds the total variance. It is not bounded below by 0.
R² divides by the total variance of the actual values (SS_tot). If every actual is identical, SS_tot is zero and R² is 0 ÷ 0 — undefined. With such data, no model can explain variance that does not exist.
GGUF (GPT-Generated Unified Format) is the standard file format for storing quantized large languag…
AI & Machine LearningQuantization reduces model size by using lower-precision numbers (4-bit instead of 32-bit). A 7B mo…
Cybersecurityllama.cpp is a plain C/C++ inference engine that runs LLMs on CPU without any dependencies. It is t…
AI & Machine LearningDebugging an AI agent means tracing through 7 stages: Prompt → Context → Tool Selection → Tool Exec…
CybersecurityKEY TAKEAWAY --> An AI agent loop is a repeating cycle: Plan → Act → Observe → Evaluate → Decide…
AI & Machine LearningKey Takeaway Transformers process all tokens simultaneously using self-attention — a mechanism that…
Compute the mean squared error of a regression from actual vs predicted value pairs.
Try it now →Compute the root mean squared error of a regression — MSE back in the target's units.
Try it now →Compute the mean absolute error of a regression from actual vs predicted value pairs.
Try it now →Calculate classification accuracy from true/false positives and negatives.
Try it now →Join the conversation about Machine Learning, r squared, coefficient of determination on the BestWordz Community forum.
Visit Forum →Have questions about R-Squared Calculator? Join the BestWordz Community.